chiark / gitweb /
sewing-table: InterlockEdge: remove a spurious z value
[reprap-play.git] / sewing-table.scad.m4
index 6e3275515af08083bd26ead3a967c2f767a8b30c..856035894f66a8a4878ad097b2880f87026fb19e 100644 (file)
@@ -19,6 +19,11 @@ screw_big_len = 4.0;
 round_edge_rad = 2.0;
 
 interlock_dia = 10;
+interlock_fine = 1.0;
+
+interlock_fine_lenslop = 1.0;
+
+demo_slop = 0.1;
 
 // calculated
 
@@ -143,12 +148,19 @@ module InterlockLobePlan(negative) {
 }
 
 module InterlockEdgePlan(negative, nlobes, length) {
+  iadj = 0.1;
+
   for (lobei = [ 0 : nlobes-1 ]) {
     lobex = (length - thehd[0]*2) * (lobei ? lobei / (nlobes-1) : 0);
     translate([lobex, 0, 0]) {
       InterlockLobePlan(negative);
     }
   }
+
+  slotshorter = negative ? 0 : interlock_fine_lenslop;
+  mirror([0, negative])
+    translate([slotshorter, iadj])
+    square([length - slotshorter*2, interlock_fine + iadj*2]);
 }
 
 module InterlockEdge(left_cnr, right_cnr, negative=0, nlobes=2) {
@@ -201,7 +213,7 @@ module TestDemo(){ ////toplevel
   translate([ -thehd[0], 0 ])
     color("blue")
     TestPiece1();
-  translate([ +thehd[0], 0 ])
+  translate([ +thehd[0] + demo_slop, 0 ])
     TestPiece2();
 }
   
@@ -229,7 +241,7 @@ module Tile02(){ ////toplevel
   RoundEdge(c[0], c[1]);
   RoundEdge(c[3], c[0]);
   RoundLeftCorner(c[0], c[1]);
-  InterlockEdge(c[2], c[3], 0, 2);
+  InterlockEdge(c[2], c[3], 0);
 }
 
 module Tile12(){ ////toplevel
@@ -239,6 +251,7 @@ module Tile12(){ ////toplevel
   posts = Rectangle_corners2posts(c);
   difference(){
     TileBase(c[0], c[2]);
+    InterlockEdge(c[0], c[1], 1);
   }
   Posts(posts);
   RoundEdge(c[2], c[3]);
@@ -247,8 +260,8 @@ module Tile12(){ ////toplevel
 }
 
 module Demo(){ ////toplevel
-  color("blue") Tile12();
-  color("red")  Tile02();
+  translate(demo_slop*[-2,1]) color("blue") Tile12();
+  translate(demo_slop*[-2,0]) color("red")  Tile02();
 }
   
 //TestPiece1();