From b092ccd0a1bf95c618890a9bee8004560b437af0 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Fri, 30 Dec 2016 16:29:34 +0000 Subject: [PATCH] sewing-table: introduce INREFFRAME_EDGE (nfc) --- sewing-table.scad.m4 | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/sewing-table.scad.m4 b/sewing-table.scad.m4 index 3d2ce81..1fa1df0 100644 --- a/sewing-table.scad.m4 +++ b/sewing-table.scad.m4 @@ -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]) -- 2.30.2