- RoundEdge(holes[0], holes[1]);
- RoundEdge(holes[0] + [ 0, 0.1 ], holes[0]);
- RoundLeftCorner(holes[0], holes[1]);
+ RoundEdge(corners[0], corners[1]);
+ RoundEdge(corners[3], corners[0]);
+ RoundLeftCorner(corners[0], corners[1]);
+}
+
+module TestPiece2(){ ////toplevel
+ holes = [ [ 0, 0],
+ [ 50, 0]
+ ];
+ corners = TestPiece_holes2corners(holes);
+ TileBase(corners[0], corners[2]);
+ Posts(holes);
+ RoundEdge(corners[0], corners[1]);
+ InterlockEdge(corners[3], corners[0], 0, nlobes=1);
+}
+
+module TestDemo(){ ////toplevel
+ translate([ -thehd[0], 0 ])
+ color("blue")
+ TestPiece1();
+ translate([ +thehd[0] + demo_slop, 0 ])
+ TestPiece2();
+}
+
+function Rectangle_corners(c0, sz) =
+ [ c0 + [ 0, 0 ],
+ c0 + [ sz[0], 0 ],
+ c0 + [ sz[0], sz[1] ],
+ c0 + [ 0, sz[1] ] ];
+
+function Rectangle_corners2posts(c) =
+ [ c[0] + thehd_tr,
+ c[1] + thehd_tl,
+ c[2] + thehd_bl,
+ c[3] + thehd_br ];
+
+module Tile02(){ ////toplevel
+ sz = [100,170];
+ c0 = -sz;
+ c = Rectangle_corners(c0, sz);
+ posts = Rectangle_corners2posts(c);
+ difference(){
+ TileBase(c[0], c[2]);
+ }
+ Posts(posts);
+ RoundEdge(c[0], c[1]);
+ RoundEdge(c[3], c[0]);
+ RoundLeftCorner(c[0], c[1]);
+ InterlockEdge(c[2], c[3], 0, 2);