chiark / gitweb /
sewing-table: introduce INREFFRAME_EDGE (nfc)
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 30 Dec 2016 16:29:34 +0000 (16:29 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 30 Dec 2016 16:29:34 +0000 (16:29 +0000)
sewing-table.scad.m4

index 3d2ce81..1fa1df0 100644 (file)
@@ -66,12 +66,18 @@ m4_define(`INREFFRAME',`
        [ 0,              0,              0,            1, ] ];
   $3
   multmatrix(m)
+')
+
+m4_dnl  INREFFRAME(left_post, right_post, morevars)
+m4_dnl    INREFFRAME_EDGE { body; }
+m4_define(`INREFFRAME_EDGE',`
   translate([-thehd[1], -thehd[0], -round_edge_rad])
 ')
 
 module RoundEdge(left_post, right_post) {
   INREFFRAME(left_post, right_post,
-             `tlength = length + thehd[1] * 2;') { m4_dnl '
+             `tlength = length + thehd[1] * 2;') m4_dnl '
+    INREFFRAME_EDGE {
     difference(){
       rotate([0,90,0])
        cylinder(r= round_edge_rad, h= tlength, $fn=50);
@@ -82,7 +88,7 @@ module RoundEdge(left_post, right_post) {
 }
 
 module RoundLeftCorner(this_post, right_post) {
-  INREFFRAME(this_post, right_post){
+  INREFFRAME(this_post, right_post) INREFFRAME_EDGE {
     difference(){
       sphere(r= round_edge_rad, $fn=60);
       translate([0,0, -20])