chiark / gitweb /
powerbank-bike-clamp: wip retainer walls etc.
[reprap-play.git] / powerbank-bike-clamp.scad
index aaf287b0e23348a8ba1f07c6d107fd3a5e951d6e..c5188987fa1cdf1971750604dad84931fc01bede 100644 (file)
@@ -45,8 +45,12 @@ bank_recess_y = 5;
 strap_th = 3;
 strap_above = 2.5;
 
+retainer_walls = [18, 30];
+
 // calculated
 
+endwall_th = main_th;
+
 bank_recess_dx = minor_wall_min;
 
 pspt_to_mm = 25.4 / 72;
@@ -191,6 +195,42 @@ module PowerBankHolderTest(){ ////toplevel
   }
 }
 
+module EndRetainer(depth){ ////toplevel
+  translate([0, -bank_y_sz/2, 0]) {
+    linextr_y_xz(-endwall_th, 0)
+    rectfromto([ 0,         -holder_x_sz/2 ],
+              [ -depth,    +holder_x_sz/2 ]);
+    
+    for (m=[0,1]) {
+      mirror([0,0,m]) {
+       linextr(-holder_x_sz/2, -bank_x_sz/2){
+         hull(){
+           rectfromto([ 0, -endwall_th ],
+                      [ depth, 0 ]);
+           rectfromto([ 0, 0 ],
+                      [ 0.1, depth-0.1 ]);
+         }
+       }
+      }
+    }
+  }
+}
+
+module PowerBankHolder(){ ////toplevel
+  difference(){
+    union(){
+      rotate([0,90,0])
+       linextr_y_xz(-(bank_y_sz/2 + 0.1),
+                    +(bank_y_sz/2 + 0.1))
+       PowerBankSidePlan();
+
+      EndRetainer(retainer_walls[0]);
+      mirror([0,1,0]) EndRetainer(retainer_walls[1]);
+    }
+    //linextr(0, strap_th) PowerBankStrapCut();
+  }
+}
+
 module TubeClampLeft() { ////toplevel
   // We want this to print with the recess overhand to the right
   // where the workpiece cooling fan is