chiark / gitweb /
digispark-with-cable: wip progress some todos
[reprap-play.git] / digispark-with-cable.scad
index 3eefdeab30062df5b2aeef5788b845051737eddb..c51dc07e3a1b9af5829b4b259440f81ae36cdfab 100644 (file)
@@ -55,9 +55,12 @@ side_x_gap = 0.5;
 
 cover_ceil_th = 0.9;
 
+cover_strap_sz_x = side_wall_th * 3.5;
+
 // calculated
 
 strap_w = strain_w;
+cover_strap_cutout_z = side_wall_th;
 
 top_top_z = usb_wall_h;
 top_base_z = -board_th;
@@ -87,6 +90,34 @@ module BothSides(){
     }
   }
 }
+
+module NormalStrapCutouts(y_c, z, rot){
+  BothSides(){
+    translate([ -total_side_wall_x, y_c, z ])
+      rotate([0, rot, 0])
+      cube([ side_wall_th,
+            strap_w,
+            10 ],
+          center=true);
+  }
+}
+module BottomStrapCutouts(y_c){
+  NormalStrapCutouts(y_c, bottom_base_z, -45);
+}
+// XXXX check strap width
+// XXXX check cable diameter
+// XXXX need rear strap
+// XXXX need bottom-to-top registration
+module CoverStrapCutouts(){
+  BothSides(){
+    translate([ -total_side_wall_x, -cover_strap_c_d_y, cover_top_z ])
+      cube([ cover_strap_sz_x*2,
+            strap_w,
+            cover_strap_cutout_z*2 ],
+          center=true);
+  }
+}
+
 module FrontWallsPlan(slop) {
   BothSides(){
     rectfromto([ -board_w/2 - side_wall_th,    0             ],
@@ -208,6 +239,7 @@ module Bottom(){ ////toplevel
       CoverRegistrations();
       cube([ 1, fit_gap_y*2, fit_gap_z*2 ], center=true);
     }
+    BottomStrapCutouts(-cover_strap_c_d_y);
   }
 }
 
@@ -220,9 +252,14 @@ module CoverMainElevation(){
   }
 }
 module Cover(){ ////toplevel
-  linextr_y_xz(main_y_min, front_y_max)
-    CoverMainElevation();
-  CoverRegistrations();
+  difference(){
+    union(){
+      linextr_y_xz(main_y_min, front_y_max)
+       CoverMainElevation();
+      CoverRegistrations();
+    }
+    CoverStrapCutouts();
+  }
 }
 
 module BottomDemo(){ ////toplevel