diff --git a/common.scad b/common.scad index 4ca337e..d1d4021 100644 --- a/common.scad +++ b/common.scad @@ -282,7 +282,7 @@ function get_anchor(anchor,center,uncentered=BOT,dflt=CENTER) = // r = Most general radius. // d = Most general diameter. // dflt = Value to return if all other values given are `undef`. -function get_radius(r1=undef, r2=undef, r=undef, d1=undef, d2=undef, d=undef, dflt=undef) = +function get_radius(r1, r2, r, d1, d2, d, dflt) = assert(num_defined([r1,d1,r2,d2])<2, "Conflicting or redundant radius/diameter arguments given.") !is_undef(r1) ? assert(is_finite(r1), "Invalid radius r1." ) r1 : !is_undef(r2) ? assert(is_finite(r2), "Invalid radius r2." ) r2 diff --git a/shapes.scad b/shapes.scad index 0c63a81..5b8c975 100644 --- a/shapes.scad +++ b/shapes.scad @@ -795,13 +795,13 @@ module xcyl(l=undef, r=undef, d=undef, r1=undef, r2=undef, d1=undef, d2=undef, h // ycyl(l=35, d=20); // ycyl(l=35, d1=30, d2=10); // } -module ycyl(l=undef, r=undef, d=undef, r1=undef, r2=undef, d1=undef, d2=undef, h=undef, anchor=CENTER) +module ycyl(l, r, d, r1, r2, d1, d2, h, anchor=CENTER) { r1 = get_radius(r1=r1, r=r, d1=d1, d=d, dflt=1); r2 = get_radius(r1=r2, r=r, d1=d2, d=d, dflt=1); l = first_defined([l, h, 1]); attachable(anchor,0,UP, r1=r1, r2=r2, l=l, axis=BACK) { - cyl(l=l, h=h, r=r, r1=r1, r2=r2, d=d, d1=d1, d2=d2, orient=BACK, anchor=CENTER); + cyl(l=l, h=h, r1=r1, r2=r2, orient=BACK, anchor=CENTER); children(); } } diff --git a/version.scad b/version.scad index 526844e..89e02f4 100644 --- a/version.scad +++ b/version.scad @@ -8,7 +8,7 @@ ////////////////////////////////////////////////////////////////////// -BOSL_VERSION = [2,0,478]; +BOSL_VERSION = [2,0,479]; // Section: BOSL Library Version Functions