+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);
+}
+
+module Tile12(){ ////toplevel
+ sz = [100,250];
+ c0 = [-sz[0], 0];
+ c = Rectangle_corners(c0, sz);
+ posts = Rectangle_corners2posts(c);
+ difference(){
+ TileBase(c[0], c[2]);
+ }
+ Posts(posts);
+ RoundEdge(c[2], c[3]);
+ RoundEdge(c[3], c[0]);
+ RoundLeftCorner(c[2], c[3]);
+}
+
+module Demo(){ ////toplevel
+ color("blue") Tile12();
+ color("red") Tile02();
+}
+