mirror of
https://github.com/revarbat/BOSL2.git
synced 2025-01-16 13:50:23 +01:00
Fixed named anchors for reuleaux_polygon()
This commit is contained in:
parent
0260495f19
commit
34ce1c203f
@ -3,7 +3,6 @@
|
||||
// Helpers to make debugging OpenScad code easier.
|
||||
// Includes:
|
||||
// include <BOSL2/std.scad>
|
||||
// include <BOSL2/debug.scad>
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
@ -1608,13 +1608,17 @@ module supershape(step=0.5,m1=4,m2=undef,n1,n2=undef,n3=undef,a=1,b=undef, r=und
|
||||
// Examples(2D):
|
||||
// reuleaux_polygon(N=3, r=50);
|
||||
// reuleaux_polygon(N=5, d=100);
|
||||
// Examples(2D): Standard vector anchors are based on extents
|
||||
// reuleaux_polygon(N=3, d=50) show_anchors(custom=false);
|
||||
// Examples(2D): Named anchors exist for the tips
|
||||
// reuleaux_polygon(N=3, d=50) show_anchors(std=false);
|
||||
module reuleaux_polygon(N=3, r, d, anchor=CENTER, spin=0) {
|
||||
assert(N>=3 && (N%2)==1);
|
||||
r = get_radius(r=r, d=d, dflt=1);
|
||||
path = reuleaux_polygon(N=N, r=r);
|
||||
anchors = [
|
||||
for (i = [0:1:N-1]) let(
|
||||
ca = 360 - (i+0.5) * 360/N,
|
||||
ca = 360 - i * 360/N,
|
||||
cp = polar_to_xy(r, ca)
|
||||
) anchorpt(str("tip",i), cp, unit(cp,BACK), 0),
|
||||
];
|
||||
@ -1641,7 +1645,7 @@ function reuleaux_polygon(N=3, r, d, anchor=CENTER, spin=0) =
|
||||
],
|
||||
anchors = [
|
||||
for (i = [0:1:N-1]) let(
|
||||
ca = 360 - (i+0.5) * 360/N,
|
||||
ca = 360 - i * 360/N,
|
||||
cp = polar_to_xy(r, ca)
|
||||
) anchorpt(str("tip",i), cp, unit(cp,BACK), 0),
|
||||
]
|
||||
|
@ -6,7 +6,7 @@
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
BOSL_VERSION = [2,0,523];
|
||||
BOSL_VERSION = [2,0,524];
|
||||
|
||||
|
||||
// Section: BOSL Library Version Functions
|
||||
|
Loading…
x
Reference in New Issue
Block a user