From 2db8133029f516637f87ceb7ae540319edb16fbc Mon Sep 17 00:00:00 2001 From: Garth Minette Date: Sun, 31 Jan 2021 15:52:00 -0800 Subject: [PATCH] Corrected anchor asserts. --- attachments.scad | 18 +++++++++--------- version.scad | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/attachments.scad b/attachments.scad index 86eb0ec..16ee9a1 100644 --- a/attachments.scad +++ b/attachments.scad @@ -354,9 +354,9 @@ function attach_geom_size(geom) = // 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. function attach_transform(anchor, spin, orient, geom, p) = - assert(is_undef(anchor) || is_vector(anchor,3) || is_string(anchor)) - assert(is_undef(spin) || is_vector(spin,3) || is_num(spin)) - assert(is_undef(orient) || is_vector(orient,3)) + assert(is_undef(anchor) || is_vector(anchor) || is_string(anchor), str("Got: ",anchor)) + assert(is_undef(spin) || is_vector(spin,3) || is_num(spin), str("Got: ",spin)) + assert(is_undef(orient) || is_vector(orient,3), str("Got: ",orient)) let( anchor = default(anchor, CENTER), spin = default(spin, 0), @@ -710,9 +710,9 @@ function reorient( axis=UP, p=undef ) = - assert(is_undef(anchor) || is_vector(anchor,3) || is_string(anchor)) - assert(is_undef(spin) || is_vector(spin,3) || is_num(spin)) - assert(is_undef(orient) || is_vector(orient,3)) + assert(is_undef(anchor) || is_vector(anchor) || is_string(anchor), str("Got: ",anchor)) + assert(is_undef(spin) || is_vector(spin,3) || is_num(spin), str("Got: ",spin)) + assert(is_undef(orient) || is_vector(orient,3), str("Got: ",orient)) let( anchor = default(anchor, CENTER), spin = default(spin, 0), @@ -918,9 +918,9 @@ module attachable( ) { dummy1 = 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(spin) || is_vector(spin,3) || is_num(spin)) - assert(is_undef(orient) || is_vector(orient,3)); + assert(is_undef(anchor) || is_vector(anchor) || is_string(anchor), str("Got: ",anchor)) + assert(is_undef(spin) || is_vector(spin,3) || is_num(spin), str("Got: ",spin)) + assert(is_undef(orient) || is_vector(orient,3), str("Got: ",orient)); anchor = default(anchor, CENTER); spin = default(spin, 0); orient = default(orient, UP); diff --git a/version.scad b/version.scad index 26c4036..9c90ca1 100644 --- a/version.scad +++ b/version.scad @@ -6,7 +6,7 @@ ////////////////////////////////////////////////////////////////////// -BOSL_VERSION = [2,0,552]; +BOSL_VERSION = [2,0,553]; // Section: BOSL Library Version Functions