-module TileBase(botleft_post, topright_post){
- botleft = botleft_post - thehd;
- size = topright_post - botleft_post + thehd * 2;
- mirror([0,0,1])
- translate([botleft[0], botleft[1], 0])
- cube([size[0], size[1], tile_th]);
+module TileBase(botleft, topright){
+ size = topright - botleft;
+ botleft_post = botleft + thehd_tr;
+ topright_post = topright + thehd_bl;
+ difference(){
+ mirror([0,0,1])
+ translate(concat(botleft, [0]))
+ cube(concat(size, [tile_th]));
+ if (!TEST) {
+ translate( concat(botleft_post, [ -tile_th ])
+ + 0.5 * [ post_dia, post_dia, 0 ] )
+ Commitid_BestCount_M( topright_post-botleft_post
+ + [-post_dia,-post_dia]
+ + [0, thehd[1]]);
+ }
+ if (TEST) {
+ translate( concat(botleft + [thehd[0], 0], [0]) )
+ Commitid_BestCount([ size[0] - thehd[0]*2, thehd[1] ]);
+ mirror([0,0,1]) {
+ translate(concat(botleft + [test_edge,test_edge], [test_tile_th]))
+ cube(concat(size - [test_edge,test_edge]*2, [tile_th]));
+ translate(concat(botleft_post, [-1]))
+ cube(concat(topright_post-botleft_post, [tile_th+2]));
+ }
+ }
+ }