mirror of
https://github.com/BelfrySCAD/BOSL2.git
synced 2024-12-29 16:29:40 +00:00
Fixed orient() for 2D dir=
This commit is contained in:
parent
9213421863
commit
c4aa61fc20
1 changed files with 3 additions and 1 deletions
|
@ -429,7 +429,9 @@ module orient(dir, anchor, spin) {
|
|||
assert(is_vector(dir));
|
||||
spin = default(spin, 0);
|
||||
assert(is_finite(spin));
|
||||
rot(spin, from=UP, to=dir) children();
|
||||
two_d = _attach_geom_2d($parent_geom);
|
||||
fromvec = two_d? BACK : UP;
|
||||
rot(spin, from=fromvec, to=dir) children();
|
||||
} else {
|
||||
assert(dir==undef, "Only one of dir= or anchor= may be given to orient()");
|
||||
assert($parent_geom != undef, "No parent to orient from!");
|
||||
|
|
Loading…
Reference in a new issue