chiark / gitweb /
sewing-table: jig: other diagonals
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 13 Jun 2017 18:41:14 +0000 (19:41 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 13 Jun 2017 18:41:14 +0000 (19:41 +0100)
sewing-table.scad.m4

index ec3f8ed..8ca8ff1 100644 (file)
@@ -209,10 +209,13 @@ module TileBase(botleft, topright){
        }
        if (JIG) {
          translate([0,0,-20]) linear_extrude(height=20) {
-           translate(botleft)
-             rotate(atan2(size[1],size[0]))
-             translate([0, -test_edge/2])
-             square([vectorlen2d(size), test_edge]);
+           for (diag=[[ +1, botleft                   ],
+                      [ -1, [topright[0], botleft[1]] ]]) {
+             translate(diag[1])
+               rotate(atan2(size[1], diag[0] * size[0]))
+               translate([0, -test_edge/2])
+               square([vectorlen2d(size), test_edge]);
+           }
          }
        }
       }