From c001c6d8ae92e454e27dd1b71f897ac7fd9bd3dc Mon Sep 17 00:00:00 2001 From: Revar Desmera Date: Sat, 14 Mar 2020 15:06:12 -0700 Subject: [PATCH] Bugfix in xflip(), yflip(), zflip(), and mirror() functions. --- transforms.scad | 13 +++++-------- version.scad | 2 +- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/transforms.scad b/transforms.scad index cbe1e00..abe7269 100644 --- a/transforms.scad +++ b/transforms.scad @@ -781,14 +781,11 @@ function zscale(z=1, p=undef) = scale([1,1,z],p=p); // #stroke(path,closed=true); // stroke(mirror(n, p=path),closed=true); function mirror(v, p) = - is_undef(p)? ( - len(v)==2? affine2d_mirror(v) : affine3d_mirror(v) - ) : ( - assert(is_list(p)) - is_num(p.x)? p - (2*(p*v)/(v*v))*v : - is_vnf(p)? [mirror(v=v,p=p.x), [for (l=p.y) reverse(l)]] : - [for (l=p) mirror(v=v, p=l)] - ); + assert(is_list(p)) + let(m = len(v)==2? affine2d_mirror(v) : affine3d_mirror(v)) + is_undef(p)? m : + is_vnf(p)? [mirror(v=v,p=p[0]), [for (face=p[1]) reverse(face)]] : + apply(m, p); // Function&Module: xflip() diff --git a/version.scad b/version.scad index dcacbd7..82723e1 100644 --- a/version.scad +++ b/version.scad @@ -8,7 +8,7 @@ ////////////////////////////////////////////////////////////////////// -BOSL_VERSION = [2,0,188]; +BOSL_VERSION = [2,0,189]; // Section: BOSL Library Version Functions