mirror of
https://github.com/BelfrySCAD/BOSL2.git
synced 2024-12-28 07:49:45 +00:00
Corrected anchor positions, improved linear response of squareness, added example
This commit is contained in:
parent
72a2c1470a
commit
504c92bba9
1 changed files with 2 additions and 2 deletions
|
@ -2024,11 +2024,11 @@ module squircle(squareness=0.7, size=[10,10], anchor=CENTER, spin=0) {
|
|||
anchors = [
|
||||
for (i = [0:1:3]) let(
|
||||
ca = 360 - i*90,
|
||||
cp = polar_to_xy(squircle_radius(squareness, bbox[0], ca), ca)
|
||||
cp = polar_to_xy(squircle_radius(squareness, bbox[0]/2, ca), ca)
|
||||
) named_anchor(str("side",i), cp, unit(cp,BACK), 0),
|
||||
for (i = [0:1:3]) let(
|
||||
ca = 360-45 - i*90,
|
||||
cp = polar_to_xy(squircle_radius(squareness, bbox[0], ca), ca)
|
||||
cp = polar_to_xy(squircle_radius(squareness, bbox[0]/2, ca), ca)
|
||||
) named_anchor(str("corner",i), cp, unit(cp,BACK), 0)
|
||||
];
|
||||
attachable(anchor,spin, two_d=true, path=path, extent=false, anchors=anchors) {
|
||||
|
|
Loading…
Reference in a new issue