chiark / gitweb /
sewing-table: InterlockEdge support nlobes=1
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 2 Jan 2017 14:46:39 +0000 (14:46 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 2 Jan 2017 14:46:39 +0000 (14:46 +0000)
sewing-table.scad.m4

index 38638ac..3311bc3 100644 (file)
@@ -160,7 +160,7 @@ module InterlockLobe(this_cnr, right_cnr, negative=0) {
 module InterlockEdge(left_cnr, right_cnr, negative=0, nlobes=2) {
   INREFFRAME(left_cnr, right_cnr) {
     for (lobei = [ 0 : nlobes-1 ]) {
-      lobex = (length - thehd[0]*2) * lobei / (nlobes-1);
+      lobex = (length - thehd[0]*2) * (lobei ? lobei / (nlobes-1) : 0);
       translate([lobex, 0, 0])
        InterlockLobeCore(negative);
     }