chiark / gitweb /
lock-inframe-bracket: Refactor ThroughHole to add features
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 19 Sep 2018 20:26:48 +0000 (21:26 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 19 Sep 2018 20:26:48 +0000 (21:26 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
lock-inframe-bracket.scad

index 01357e3..be52d09 100644 (file)
@@ -211,19 +211,24 @@ module ExtrudeClipElevation(extra=0){
     children(0);
 }
 
-module ThroughHole(r, y, z) {
-  translate([-50, y, z])
+module ThroughHole(r, y, z, x=-50) {
+  translate([x, y, z])
     rotate([0, 90, 0])
     cylinder(r=r, h=100, $fn=20);
 }
 
-module ThroughHoles(){
+module MountingHoleCylinders(r, x=-50){
   for (z=[ 1/4, 3/4 ]) {
     rotate([0,0, backflange_angle])
-      ThroughHole( mountscrew_dia/2,
+      ThroughHole( r,
                   -tube_or -0.5*backflange_d,
-                  total_h * z );
+                  total_h * z,
+                  x);
   }
+}
+
+module ThroughHoles(){
+  MountingHoleCylinders(mountscrew_dia/2);
 
   ThroughHole( clipbolt_dia/2,
               lock_0y + lock_d/2 + clip_d/2 + front_th/2,