chiark / gitweb /
sewing-table: fix commitid overlap bug
[reprap-play.git] / sewing-table.scad.m4
index d3930c5862768c47f50dfb15da79b5252b03d9b9..201b28c909558178096882ea347354e98f100a97 100644 (file)
@@ -130,6 +130,9 @@ interlock_sq_adj = 0.2; // arbitrary
 
 first_front = machine_front_profile[len(machine_front_profile)-1];
 
+m4_define(`POST_TCROSSSZ',
+          `2*( tile_hard_edge_hole_dist - test_edge + 1 )')
+
 module Post(){
   mirror([0,0,1]) {
     difference(){
@@ -140,10 +143,9 @@ module Post(){
       }
     }
     if (TEST) {
-      tsz = tile_hard_edge_hole_dist - test_edge + 1;
       translate([0,0, tile_th/2]) {
-       cube([post_dia, tsz*2, tile_th], center=true);
-       cube([tsz*2, post_dia, tile_th], center=true);
+       cube([post_dia,      POST_TCROSSSZ, tile_th], center=true);
+       cube([POST_TCROSSSZ, post_dia,      tile_th], center=true);
       }
     }
   }
@@ -172,8 +174,9 @@ module TileBase(botleft, topright){
                              + [0, thehd[1]]);
     }
     if (TEST) {
-      translate( concat(botleft + [thehd[0], 0], [0]) )
-       Commitid_BestCount([ size[0] - thehd[0]*2, thehd[1] ]);
+      crossoff = tile_hard_edge_hole_dist + POST_TCROSSSZ/2;
+      translate( concat(botleft + [crossoff, 0], [0]) )
+       Commitid_BestCount([ size[0] - 2*crossoff, thehd[1] ]);
       difference(){
        mirror([0,0,1]) {
          translate(concat(botleft + [test_edge,test_edge], [test_tile_th]))