chiark / gitweb /
powerbank-bike-clamp: break out screws and fix cutout
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 6 Feb 2021 01:05:39 +0000 (01:05 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 7 Feb 2021 23:04:11 +0000 (23:04 +0000)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
powerbank-bike-clamp.scad

index f7bd40225339b879c3575a58bf3b9c8f5df68118..90fae7578561f1ecb25b464296fc0a8d25fa267c 100644 (file)
@@ -134,14 +134,29 @@ module TubeClampRightPlan(){
   }
 }
 
+module Screws(){
+  linextr_x_yz(-main_r*5, main_r*5)
+    translate([screw_y, 0])
+    circle(r= screw/2);
+
+  translate([0, screw_y, 0]) {
+    linextr_x_yz(-(clamp_gap/2 + screw_nut_th), 0)
+      square([screw_nut_across,
+             screw_nut_across / cos(30) + bridge_slop*2],
+            center=true);
+
+    linextr_x_yz(-200, -main_r + screw_head_h)
+      square([screw_head, screw_head + bridge_slop*2],
+            center=true);
+  }
+}
+
 module SomeClamp(hinge_alt=false){
   difference(){
     linextr(-clamp_width/2, clamp_width/2)
       children(0);
 
-    linextr_x_yz(-main_r*5, main_r*5)
-      translate([screw_y, 0])
-      circle(r= screw/2);
+    Screws();
 
     for (i=[0 : hinge_lobes-1]) {
       translate([0,
@@ -263,16 +278,7 @@ module TubeClampLeft() { ////toplevel
       SomeClamp(true)
        TubeClampLeftPlan();
 
-      translate([0, screw_y, 0]) {
-       linextr_x_yz(-(clamp_gap/2 + screw_nut_th), 0)
-         square([screw_nut_across,
-                 screw_nut_across / cos(30) + bridge_slop*2],
-                center=true);
-
-       linextr_x_yz(-main_r, -main_r + screw_head_h)
-         square([screw_head, screw_head + bridge_slop*2],
-                center=true);
-      }
+      Screws();
     }
   }
 }