mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-11 09:14:29 +02:00
use c-style for
This commit is contained in:
@@ -33,12 +33,12 @@ module ring_extrude(shape_pts, radius, angle = 360, twist = 0, scale = 1.0, tria
|
||||
|
||||
angs = [
|
||||
[90, 0, angles[0]],
|
||||
if(m <= n) each [for(i = [m:n]) [90, 0, a_step * i]]
|
||||
each [for(i = m; i <= n; i = i + 1) [90, 0, a_step * i]]
|
||||
];
|
||||
|
||||
pts = [
|
||||
__ra_to_xy(begin_r, angles[0]),
|
||||
if(m <= n) each [for(i = [m:n]) __ra_to_xy(radius, a_step * i)]
|
||||
each [for(i = m; i <= n; i = i + 1) __ra_to_xy(radius, a_step * i)]
|
||||
];
|
||||
|
||||
is_angle_frag_end = angs[len(angs) - 1][2] == angles[1];
|
||||
|
@@ -28,14 +28,14 @@ function shape_arc(radius, angle, width, width_mode = "LINE_CROSS") =
|
||||
points = [
|
||||
// outer arc path
|
||||
__ra_to_xy(__edge_r_begin(r_outer, a0, a_step, m), a0),
|
||||
if(m <= n) each [for(i = m; i <= n; i = i + 1) __ra_to_xy(r_outer, a_step * i)],
|
||||
each [for(i = m; i <= n; i = i + 1) __ra_to_xy(r_outer, a_step * i)],
|
||||
if(a1 != a_step * n) each [
|
||||
__ra_to_xy(__edge_r_end(r_outer, a1, a_step, n), a1),
|
||||
// inner arc path
|
||||
__ra_to_xy(__edge_r_end(r_inner, a1, a_step, n), a1)
|
||||
],
|
||||
// inner arc path
|
||||
if(m <= n) each [
|
||||
each [
|
||||
for(i = m; i <= n; i = i + 1)
|
||||
__ra_to_xy(r_inner, a_step * (n + m - i))
|
||||
|
||||
|
Reference in New Issue
Block a user