chiark / gitweb /
flyscreen-handle: from v3: break out Ribbles (nfc)
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 28 Aug 2016 13:54:51 +0000 (14:54 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 28 Aug 2016 13:54:51 +0000 (14:54 +0100)
flyscreen-handle.scad

index 36205f1..f18a83f 100644 (file)
@@ -158,16 +158,22 @@ module StrapSectBot(){
   }
 }
 
+module Ribbles(xmax, xmin, y){
+  for (x = [ xmax + ourcirc_r - ribble_rad :
+            -ribble_rad * 4 :
+            xmin ]) {
+    translate([x, y])
+      circle(r = ribble_rad, $fn=20);
+  }
+}
+
 module LeverSectTop(){
   difference(){
     union(){
       LeverSect(true, false);
-      for (x = [ P8t[0] + ourcirc_r - ribble_rad :
-                -ribble_rad * 4 :
-                Q0[0] + edge_or + ribble_rad*2 ]) {
-       translate([x, P5[1] + ourcirc_r])
-         circle(r = ribble_rad, $fn=20);
-      }
+      Ribbles(P8t[0],
+             Q0[0] + edge_or + ribble_rad*2,
+             P5[1] + ourcirc_r);
     }
     translate([pivot_x,0]) circle(r= pivot_r + pivot_slop, $fn=20);
   }