diff --git a/regions.scad b/regions.scad index 1e453f5..253d91b 100644 --- a/regions.scad +++ b/regions.scad @@ -297,7 +297,7 @@ function force_region(poly) = is_path(poly) ? [poly] : poly; // [square([60,10], center=true)] // ); // region(rgn); -module region(r, anchor="origin", spin=0, cp="centroid") +module region(r, anchor="origin", spin=0, cp="centroid", atype="hull") { assert(in_list(atype, _ANCHOR_TYPES), "Anchor type must be \"hull\" or \"intersect\""); r = force_region(r); diff --git a/shapes2d.scad b/shapes2d.scad index 977e942..ad93b84 100644 --- a/shapes2d.scad +++ b/shapes2d.scad @@ -1189,7 +1189,8 @@ function supershape(step=0.5, m1=4, m2, n1=1, n2, n3, a=1, b, r, d,anchor=CENTER path = [for (i = [steps:-1:1]) let(a=angs[i]) scale*rads[i]*[cos(a), sin(a)]] ) reorient(anchor,spin, two_d=true, path=path, p=path, extent=atype=="hull"); -module supershape(step=0.5,m1=4,m2=undef,n1,n2=undef,n3=undef,a=1,b=undef, r=undef, d=undef, anchor=CENTER, spin=0) { +module supershape(step=0.5,m1=4,m2=undef,n1,n2=undef,n3=undef,a=1,b=undef, r=undef, d=undef, anchor=CENTER, spin=0, atype="hull") { + assert(in_list(atype, _ANCHOR_TYPES), "Anchor type must be \"hull\" or \"intersect\""); path = supershape(step=step,m1=m1,m2=m2,n1=n1,n2=n2,n3=n3,a=a,b=b,r=r,d=d); attachable(anchor,spin,extent=atype=="hull", two_d=true, path=path) { polygon(path); diff --git a/skin.scad b/skin.scad index 3880f08..cf60b33 100644 --- a/skin.scad +++ b/skin.scad @@ -1130,7 +1130,7 @@ module sweep(shape, transforms, closed=false, caps, style="min_edge", convexity= anchor="origin",cp="centroid",spin=0, orient=UP, atype="hull") { vnf = sweep(shape, transforms, closed, caps, style); - vnf_polyhedron(vnf,convexity=convexity,anchor=anchor, spin=spin, orient=orient, vnf=vnf, atype=atype, cp=cp) + vnf_polyhedron(vnf,convexity=convexity,anchor=anchor, spin=spin, orient=orient, atype=atype, cp=cp) children(); }