chiark / gitweb /
sewing-table: commitid wip
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 30 Dec 2016 16:59:58 +0000 (16:59 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 30 Dec 2016 16:59:58 +0000 (16:59 +0000)
sewing-table.scad.m4

index 37c2be03e45e5e7a9f4dc7d393bb1b586ce1f639..164350ee563ff188d2ac929790ca6d6f42fd9d76 100644 (file)
@@ -1,6 +1,7 @@
 // -*- C -*-
 
 include <funcs.scad>
+include <commitid.scad>
 
 ply_th = 18;
 ply_hole_dia = 15;
@@ -54,9 +55,15 @@ module Posts(posts) {
 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]);
+  difference(){
+    mirror([0,0,1])
+      translate([botleft[0], botleft[1], 0])
+      cube([size[0], size[1], tile_th]);
+    translate( [ botleft_post[0], botleft_post[1], -tile_th ]
+              + 0.5 * [ post_dia, -post_dia, 0 ] )
+      Commitid_BestCount_M( topright_post-botleft_post
+                           + [-post_dia,+post_dia] );
+  }
 }
 
 m4_dnl  INREFFRAME(left_post, right_post, morevars) { body; }