chiark / gitweb /
topeak-seatstay-lock: break out PiecePrint
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 1 Jun 2014 09:48:50 +0000 (10:48 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 1 Jun 2014 09:48:50 +0000 (10:48 +0100)
topeak-seatstay-lock.scad

index f5265e670ac76a70ee79c2f5f1aaa9004516c0f3..b85632423826e7a53df0fec072114bbf059828b6 100644 (file)
@@ -111,11 +111,15 @@ module Piece(pc,interval){
   }
 }
 
-module PiecesPrint(){
+module PiecePrint(pc){
   rotate([0,180,0])
-    for (pc=[0,1]){
-      Piece(pc,4);
-    }
+    Piece(pc,4);
+}
+
+module PiecesPrint(pcs=[0,1]){
+  for (pc=pcs){
+    PiecePrint();
+  }
 }
 
 module Demo(){