mirror of
https://github.com/BelfrySCAD/BOSL2.git
synced 2025-01-01 09:49:45 +00:00
Bugfix in xflip(), yflip(), zflip(), and mirror() functions.
This commit is contained in:
parent
608bde9077
commit
c001c6d8ae
2 changed files with 6 additions and 9 deletions
|
@ -781,14 +781,11 @@ function zscale(z=1, p=undef) = scale([1,1,z],p=p);
|
||||||
// #stroke(path,closed=true);
|
// #stroke(path,closed=true);
|
||||||
// stroke(mirror(n, p=path),closed=true);
|
// stroke(mirror(n, p=path),closed=true);
|
||||||
function mirror(v, p) =
|
function mirror(v, p) =
|
||||||
is_undef(p)? (
|
assert(is_list(p))
|
||||||
len(v)==2? affine2d_mirror(v) : affine3d_mirror(v)
|
let(m = len(v)==2? affine2d_mirror(v) : affine3d_mirror(v))
|
||||||
) : (
|
is_undef(p)? m :
|
||||||
assert(is_list(p))
|
is_vnf(p)? [mirror(v=v,p=p[0]), [for (face=p[1]) reverse(face)]] :
|
||||||
is_num(p.x)? p - (2*(p*v)/(v*v))*v :
|
apply(m, p);
|
||||||
is_vnf(p)? [mirror(v=v,p=p.x), [for (l=p.y) reverse(l)]] :
|
|
||||||
[for (l=p) mirror(v=v, p=l)]
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
// Function&Module: xflip()
|
// Function&Module: xflip()
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
BOSL_VERSION = [2,0,188];
|
BOSL_VERSION = [2,0,189];
|
||||||
|
|
||||||
|
|
||||||
// Section: BOSL Library Version Functions
|
// Section: BOSL Library Version Functions
|
||||||
|
|
Loading…
Reference in a new issue