mirror of
https://github.com/BelfrySCAD/BOSL2.git
synced 2024-12-29 16:29:40 +00:00
attachment bugfixes
This commit is contained in:
parent
47bf93e6cb
commit
cd664f830c
3 changed files with 4 additions and 3 deletions
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue