From 5221b80c4a3faa284046512dc3f109e991aad844 Mon Sep 17 00:00:00 2001 From: Henk Vergonet Date: Mon, 3 Jun 2024 13:50:01 +0200 Subject: [PATCH] rect: whitespace fixes --- shapes2d.scad | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/shapes2d.scad b/shapes2d.scad index b159405..fcf3e72 100644 --- a/shapes2d.scad +++ b/shapes2d.scad @@ -154,6 +154,8 @@ module rect(size=1, rounding=0, atype="box", chamfer=0, anchor=CENTER, spin=0, c } } + + function rect(size=1, rounding=0, chamfer=0, atype="box", anchor=CENTER, spin=0, _return_override, cswap = [0,0,0,0]) = assert(is_num(size) || is_vector(size,2)) assert(is_num(chamfer) || is_vector(chamfer,4)) @@ -198,7 +200,7 @@ function rect(size=1, rounding=0, chamfer=0, atype="box", anchor=CENTER, spin=0, qchamf = chamfer[quad], qround = rounding[quad], cverts = quant(segs(abs(qinset)),4)/4, - step = 90/cverts, + step = 90/cverts, cp = v_mul(size/2 + (cswap[quad] ? (qinset > 0 ? 0 : 1) : -1)*[qinset,abs(qinset)], qpos), qpts = abs(qchamf) >= eps? [[0,abs(qinset)], [qinset,0]] :