mirror of
https://github.com/BelfrySCAD/BOSL2.git
synced 2025-01-01 09:49:45 +00:00
Corrected anchor asserts.
This commit is contained in:
parent
cc4e4ff402
commit
2db8133029
2 changed files with 10 additions and 10 deletions
|
@ -354,9 +354,9 @@ function attach_geom_size(geom) =
|
||||||
// geom = The geometry description of the shape.
|
// geom = The geometry description of the shape.
|
||||||
// p = If given as a VNF, path, or point, applies the affine3d transformation matrix to it and returns the result.
|
// p = If given as a VNF, path, or point, applies the affine3d transformation matrix to it and returns the result.
|
||||||
function attach_transform(anchor, spin, orient, geom, p) =
|
function attach_transform(anchor, spin, orient, geom, p) =
|
||||||
assert(is_undef(anchor) || is_vector(anchor,3) || is_string(anchor))
|
assert(is_undef(anchor) || is_vector(anchor) || is_string(anchor), str("Got: ",anchor))
|
||||||
assert(is_undef(spin) || is_vector(spin,3) || is_num(spin))
|
assert(is_undef(spin) || is_vector(spin,3) || is_num(spin), str("Got: ",spin))
|
||||||
assert(is_undef(orient) || is_vector(orient,3))
|
assert(is_undef(orient) || is_vector(orient,3), str("Got: ",orient))
|
||||||
let(
|
let(
|
||||||
anchor = default(anchor, CENTER),
|
anchor = default(anchor, CENTER),
|
||||||
spin = default(spin, 0),
|
spin = default(spin, 0),
|
||||||
|
@ -710,9 +710,9 @@ function reorient(
|
||||||
axis=UP,
|
axis=UP,
|
||||||
p=undef
|
p=undef
|
||||||
) =
|
) =
|
||||||
assert(is_undef(anchor) || is_vector(anchor,3) || is_string(anchor))
|
assert(is_undef(anchor) || is_vector(anchor) || is_string(anchor), str("Got: ",anchor))
|
||||||
assert(is_undef(spin) || is_vector(spin,3) || is_num(spin))
|
assert(is_undef(spin) || is_vector(spin,3) || is_num(spin), str("Got: ",spin))
|
||||||
assert(is_undef(orient) || is_vector(orient,3))
|
assert(is_undef(orient) || is_vector(orient,3), str("Got: ",orient))
|
||||||
let(
|
let(
|
||||||
anchor = default(anchor, CENTER),
|
anchor = default(anchor, CENTER),
|
||||||
spin = default(spin, 0),
|
spin = default(spin, 0),
|
||||||
|
@ -918,9 +918,9 @@ module attachable(
|
||||||
) {
|
) {
|
||||||
dummy1 =
|
dummy1 =
|
||||||
assert($children==2, "attachable() expects exactly two children; the shape to manage, and the union of all attachment candidates.")
|
assert($children==2, "attachable() expects exactly two children; the shape to manage, and the union of all attachment candidates.")
|
||||||
assert(is_undef(anchor) || is_vector(anchor,3) || is_string(anchor))
|
assert(is_undef(anchor) || is_vector(anchor) || is_string(anchor), str("Got: ",anchor))
|
||||||
assert(is_undef(spin) || is_vector(spin,3) || is_num(spin))
|
assert(is_undef(spin) || is_vector(spin,3) || is_num(spin), str("Got: ",spin))
|
||||||
assert(is_undef(orient) || is_vector(orient,3));
|
assert(is_undef(orient) || is_vector(orient,3), str("Got: ",orient));
|
||||||
anchor = default(anchor, CENTER);
|
anchor = default(anchor, CENTER);
|
||||||
spin = default(spin, 0);
|
spin = default(spin, 0);
|
||||||
orient = default(orient, UP);
|
orient = default(orient, UP);
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
BOSL_VERSION = [2,0,552];
|
BOSL_VERSION = [2,0,553];
|
||||||
|
|
||||||
|
|
||||||
// Section: BOSL Library Version Functions
|
// Section: BOSL Library Version Functions
|
||||||
|
|
Loading…
Reference in a new issue