chiark / gitweb /
digispark-with-cable: wip progress
[reprap-play.git] / digispark-with-cable.scad
index 89aa5dbf99eb26add3da5c2d4079fd66491168ec..e055eacc5f0cd9ea872604fb5a1104444d3989d8 100644 (file)
@@ -22,7 +22,8 @@ sw_to_edge = board_w/2 + 0.1;
 front_wall_th = 0.75;
 // egress_w = 8.0;
 
-wall_y_min = -board_l - side_wall_th;;
+wall_y_min = -board_l - side_wall_th; // XXXX remove
+main_y_min = -board_l - side_wall_th;
 ceil_y_min = wall_y_min - 5;;
 
 small_walls = [
@@ -34,6 +35,19 @@ small_walls = [
 chip_cutout = [[ -sw_to_edge + 4.20,    -3.75 ],
               [ -sw_to_edge + 11.95,  -11.90 ]];
 
+strain_w = 2.0 + 0.5;
+strain_t = 1.0 + 0.5;
+strain_pitch_across = 5;
+strain_pitch_along = 10;
+strain_groove_d = 2;
+strain_groove_w = 3;
+
+// calculated
+
+strain_0_y_c = main_y_min - strain_w/2;
+strain_1_y_c = strain_0_y_c - strain_pitch_along;
+total_y_min = strain_1_y_c - strain_w/2 - side_wall_th;
+
 module BothSides(){
   for (m=[0,1]) {
     mirror([m,0]) {
@@ -77,16 +91,33 @@ module TopMainWallsPlan() {
   }
   FrontWallsPlan(usb_tongue_w_slop);
   rectfromto([ -board_w/2 - side_wall_th + 0, -      board_l   ],
-            [ +board_w/2 + side_wall_th,            wall_y_min ]);
+            [ +board_w/2 + side_wall_th,            total_y_min ]);
 }
 
-module Top(){
-  linextr(0, usb_wall_h)
-    TopSmallWallsPlan();
-  linextr(usb_wall_h - usb_ceil_th, usb_wall_h)
-    TopCeilPlan();
-  linextr(-board_th, usb_wall_h)
-    TopMainWallsPlan();
+module Top(){ ////toplevel
+  difference(){
+    union(){
+      linextr(0, usb_wall_h)
+       TopSmallWallsPlan();
+      linextr(usb_wall_h - usb_ceil_th, usb_wall_h)
+       TopCeilPlan();
+      linextr(-board_th, usb_wall_h)
+       TopMainWallsPlan();
+    }
+
+    for (y_c = [strain_0_y_c, strain_1_y_c]) {
+      for (x_c = [-1,+1] * strain_pitch_across/2) {
+       translate([x_c, y_c, 0])
+         linextr(-20, 20)
+         square([ strain_t, strain_w ], center=true);
+      }
+    }
+    linextr_y_xz(total_y_min-1, main_y_min)
+      translate([0, -board_th])
+      scale([1, strain_groove_d/strain_groove_w])
+      circle(strain_groove_w/2, $fn = 8);
+  }
 }
 
-Top();
+module Bottom(){ ////toplevel
+}