From: Ian Jackson Date: Mon, 2 Jan 2017 16:26:15 +0000 (+0000) Subject: sewing-table: RoundCornerAdd/Cut: change calling convention (nfc) X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=b006c1b96da9329277c5b993de12974259cc67cb;p=reprap-play.git sewing-table: RoundCornerAdd/Cut: change calling convention (nfc) --- diff --git a/sewing-table.scad.m4 b/sewing-table.scad.m4 index 2231e3f..83d04e0 100644 --- a/sewing-table.scad.m4 +++ b/sewing-table.scad.m4 @@ -121,7 +121,9 @@ module RoundEdge(left_cnr, right_cnr) { } } -module RoundCornerCut(this_cnr, right_cnr) { +module RoundCornerCut(ci) { + this_cnr = ci[0]; + right_cnr = ci[1]; offr= round_cnr_rad - round_edge_rad; INREFFRAME(this_cnr, right_cnr) INREFFRAME_EDGE { difference(){ @@ -132,7 +134,9 @@ module RoundCornerCut(this_cnr, right_cnr) { } } -module RoundCornerAdd(this_cnr, right_cnr) { +module RoundCornerAdd(ci) { + this_cnr = ci[0]; + right_cnr = ci[1]; bigr = round_cnr_rad - round_edge_rad; INREFFRAME(this_cnr, right_cnr) INREFFRAME_EDGE { intersection(){ @@ -282,6 +286,7 @@ module Tile02(){ ////toplevel c0 = -sz; c = Rectangle_corners(c0, sz); posts = Rectangle_corners2posts(c); + rcs = [c[0], c[1]]; difference(){ union(){ TileBase(c[0], c[2]); @@ -291,9 +296,9 @@ module Tile02(){ ////toplevel InterlockEdge(c[2], c[3], 0); } InterlockEdge(c[1], c[2], 1); - RoundCornerCut(c[0], c[1]); + RoundCornerCut(rcs); } - RoundCornerAdd(c[0], c[1]); + RoundCornerAdd(rcs); } module Tile12(){ ////toplevel @@ -301,6 +306,7 @@ module Tile12(){ ////toplevel c0 = [-sz[0], 0]; c = Rectangle_corners(c0, sz); posts = Rectangle_corners2posts(c); + rcs = [c[2], c[3]]; difference(){ union(){ TileBase(c[0], c[2]); @@ -309,9 +315,9 @@ module Tile12(){ ////toplevel Posts(posts); } InterlockEdge(c[0], c[1], 1); - RoundCornerCut(c[2], c[3]); + RoundCornerCut(rcs); } - RoundCornerAdd(c[2], c[3]); + RoundCornerAdd(rcs); } module Demo(){ ////toplevel