From: Ian Jackson Date: Mon, 2 Jan 2017 14:32:56 +0000 (+0000) Subject: sewing-table: InterlockLobe*: Move negative-dependent calculations into Core (nfc) X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=reprap-play.git;a=commitdiff_plain;h=ba0bf7a28b79a5d928d746632d11f411037aeb23 sewing-table: InterlockLobe*: Move negative-dependent calculations into Core (nfc) --- diff --git a/sewing-table.scad.m4 b/sewing-table.scad.m4 index 2d48d82..dd3f0f1 100644 --- a/sewing-table.scad.m4 +++ b/sewing-table.scad.m4 @@ -139,7 +139,10 @@ module InterlockLobePlan(r, ymir) { } } -module InterlockLobeCore(r, plusth, ymir) { +module InterlockLobeCore(negative=0) { + r = negative ? interlock_negative_rad : interlock_rad; + plusth = negative * 1.0; + ymir = negative ? 0 : 1; translate([0, 0, plusth]){ mirror([0,0,1]){ linear_extrude(height=tile_th+plusth*2, convexity=10){ @@ -151,9 +154,7 @@ module InterlockLobeCore(r, plusth, ymir) { module InterlockLobe(this_cnr, right_cnr, negative=0) { INREFFRAME(this_cnr, right_cnr) - InterlockLobeCore(negative ? interlock_negative_rad : interlock_rad, - negative ? 1 : 0, - negative ? 0 : 1); + InterlockLobeCore(negative); } function TestPiece_holes2corners(holes) =