chiark / gitweb /
powerbank-bike-clamp: Move brace and strap away from button
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 16 Feb 2021 17:59:28 +0000 (17:59 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 16 Feb 2021 17:59:28 +0000 (17:59 +0000)
The power bank has a button and some LEDs where the brace and strap
were.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
powerbank-bike-clamp.scad

index 50518acb6767940139bba01b1ee086083a41c5e1..18b3adbd2f3869056f8f6993e490242df6463304 100644 (file)
@@ -68,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
@@ -97,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);
 
@@ -301,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){
@@ -322,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])