chiark / gitweb /
knifeblock: move yshift out of DoKnives
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 31 Dec 2014 12:10:21 +0000 (12:10 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 31 Dec 2014 12:10:21 +0000 (12:10 +0000)
knifeblock.scad

index 3c4204abb0dd7afa9ed494eea06e04d1c3d5daa5..12450f169472307687367c6add0427c4d304778f 100644 (file)
@@ -56,12 +56,8 @@ module DoKnife(k){
 }
 
 module DoKnives(){
-  for (yshift=[-1,1]) {
-    translate([0, yshift * frontbackslop, 0])
-      for (k=[0:nknives-1]) {
-       DoKnife(k);
-      }
-  }
+  for (k=[0:nknives-1])
+    DoKnife(k);
 }
 
 module ScrewHole(){
@@ -94,7 +90,9 @@ module Block(){
       translate([x, 0, -screwabove])
        ScrewHole();
     }
-    DoKnives();
+    for (yshift=[-1,1])
+      translate([0, yshift * frontbackslop, 0])
+       DoKnives();
   }
 }