chiark / gitweb /
sewing-table: commitid (non-TEST): centering
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 25 May 2017 01:26:30 +0000 (02:26 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 25 May 2017 01:30:14 +0000 (02:30 +0100)
sewing-table.scad.m4

index 458d00e..3d4597a 100644 (file)
@@ -170,9 +170,12 @@ module TileBase(botleft, topright){
       cidsz = topright_post-botleft_post
        + [-post_dia,-post_dia]
        + [0, thehd[1]];
+      cidszr = [ min(cidsz[0],50), min(cidsz[1],50) ];
+      echo("CID",cidsz,cidszr);
       translate( concat(botleft_post, [ -tile_th ])
-                + 0.5 * [ post_dia, post_dia, 0 ] )
-       Commitid_BestCount_M(cidsz);
+                + 0.5 * [ post_dia, post_dia, 0 ]
+                + 0.5 * concat( cidsz - cidszr, [ 0 ]) )
+       Commitid_BestCount_M(cidszr);
     }
     if (TEST) {
       crossoff = tile_hard_edge_hole_dist + POST_TCROSSSZ/2;