chiark / gitweb /
adafruit-powerboost: break out PsuMountWindowsNegative
[reprap-play.git] / powerbank-bike-clamp.scad
index b2a03a280acb4068e3b17bd6c0a53e2fa3cfb75e..18b3adbd2f3869056f8f6993e490242df6463304 100644 (file)
@@ -15,6 +15,7 @@ minor_wall_min = 1;
 
 screw = 5.0 + 0.75;
 screw_head = 8.7 + 1.2;
+screw_head_space_above = 10;
 screw_nut_across = 7.9 + 0.75;
 screw_nut_th = 3.9 + 0.75;
 
@@ -67,6 +68,10 @@ liner_th = 0.8;
 brace_r = 5;
 brace_len = 50;
 
+straps_y_adj = [ 3.5,
+                0,
+                0 ];
+
 // calculated
 
 straps_y = [ -bank_y_sz * 0.25, // these entries are special and used
@@ -96,8 +101,11 @@ bank_bot_y = strap_above + strap_th;
 strap_r = strap_th;
 
 brace_total_len = brace_len + main_th;
-brace_ctrs_y = [ straps_y[0] - (brace_r + strap_w/2),
-                straps_y[1] + (brace_r + strap_w/2) ];
+brace_ctrs_y_nom = [ straps_y[0] - (brace_r + strap_w/2),
+                    straps_y[1] + (brace_r + strap_w/2) ];
+
+brace_ctrs_y = [ (straps_y + straps_y_adj)[0] + (brace_r + strap_w/2),
+                (straps_y + straps_y_adj)[1] + (brace_r + strap_w/2) ];
 
 clamp_width_actual = max(clamp_min_width, holder_x_sz);
 
@@ -171,7 +179,7 @@ module Screws(){
              screw_nut_across / cos(30) + bridge_slop*2],
             center=true);
 
-    linextr_x_yz(-200,
+    linextr_x_yz(-(main_r + bank_recess_y + screw_head_space_above),
                 -(clamp_gap/2 + screw_nut_th + screw_head_behind))
       square([screw_head, screw_head + bridge_slop*2],
             center=true);
@@ -300,12 +308,12 @@ module PowerBankHolder(){ ////toplevel
          }
        }
        translate([brace_total_len, 0,0])
-         linextr_y_xz(brace_ctrs_y[0] - brace_r,
-                      brace_ctrs_y[1] + brace_r)
+         linextr_y_xz(brace_ctrs_y_nom[0] - brace_r,
+                      brace_ctrs_y_nom[1] + brace_r)
          BraceTubePlan();
       }
 
-      for (strap_y = straps_y) {
+      for (strap_y = straps_y + straps_y_adj) {
        translate([0, strap_y, 0]) {
          linextr(-holder_x_sz/2,
                  +holder_x_sz/2){
@@ -321,7 +329,7 @@ module PowerBankHolder(){ ////toplevel
       }
     }
 
-    for (strap_y = straps_y)
+    for (strap_y = straps_y + straps_y_adj)
       translate([0, strap_y, 0])
        rotate([0,0,-90])
        rotate([0,90,0])