mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-14 02:34:12 +02:00
supported the same sections
This commit is contained in:
@@ -17,14 +17,14 @@ module ring_extrude(shape_pts, radius, angle = 360, twist = 0, scale = 1.0, tria
|
|||||||
frags = __frags(radius);
|
frags = __frags(radius);
|
||||||
|
|
||||||
// 359.999988 is for avoiding "CGAL ERROR: assertion violation"
|
// 359.999988 is for avoiding "CGAL ERROR: assertion violation"
|
||||||
ang = angle == 360 ? 359.999988 : angle;
|
ang = (angle == 360 && twist % 360 != 0) ? 359.999988 : angle;
|
||||||
|
|
||||||
angle_step = 360 / frags;
|
angle_step = 360 / frags;
|
||||||
as = [for(a = [0:angle_step:ang]) [90, 0, a]];
|
as = [for(a = [0:angle_step:ang]) [90, 0, a]];
|
||||||
|
|
||||||
angles = as[len(as) - 1][2] == ang ? as : concat(as, [[90, 0, ang]]);
|
angles = as[len(as) - 1][2] == ang ? as : concat(as, [[90, 0, ang]]);
|
||||||
pts = [for(a = angles) [radius * cos(a[2]), radius * sin(a[2])]];
|
pts = [for(a = angles) [radius * cos(a[2]), radius * sin(a[2])]];
|
||||||
|
|
||||||
polysections(
|
polysections(
|
||||||
cross_sections(shape_pts, pts, angles, twist, scale),
|
cross_sections(shape_pts, pts, angles, twist, scale),
|
||||||
triangles = triangles
|
triangles = triangles
|
||||||
|
Reference in New Issue
Block a user