diff --git a/src/arc.scad b/src/arc.scad index 19e21478..39af40a5 100644 --- a/src/arc.scad +++ b/src/arc.scad @@ -46,11 +46,11 @@ module arc(radius, angle, width, width_mode = "LINE_CROSS") { points = concat( // outer arc path [__ra_to_xy(edge_r_begin(r_outer, angles[0]), angles[0])], - m >= n ? [] : [for(i = [m:n]) __ra_to_xy(r_outer, a_step * i)], + m > n ? [] : [for(i = [m:n]) __ra_to_xy(r_outer, a_step * i)], angles[1] == a_step * n ? [] : [__ra_to_xy(edge_r_end(r_outer, angles[1]), angles[1])], // inner arc path angles[1] == a_step * n ? [] : [__ra_to_xy(edge_r_end(r_inner, angles[1]), angles[1])], - m >= n ? [] : [ + m > n ? [] : [ for(i = [m:n]) let(idx = (n + (m - i))) __ra_to_xy(r_inner, a_step * idx) diff --git a/src/shape_arc.scad b/src/shape_arc.scad index 5aa4a46e..8b0b8ac4 100644 --- a/src/shape_arc.scad +++ b/src/shape_arc.scad @@ -40,14 +40,14 @@ function shape_arc(radius, angle, width, width_mode = "LINE_CROSS") = points = concat( // outer arc path [__ra_to_xy(_edge_r_begin(r_outer, angles[0], a_step, m), angles[0])], - m >= n ? [] : [ + m > n ? [] : [ for(i = [m:n]) __ra_to_xy(r_outer, a_step * i) ], angles[1] == a_step * n ? [] : [__ra_to_xy(_edge_r_end(r_outer, angles[1], a_step, n), angles[1])], // inner arc path angles[1] == a_step * n ? [] : [__ra_to_xy(_edge_r_end(r_inner, angles[1], a_step, n), angles[1])], - m >= n ? [] : [ + m > n ? [] : [ for(i = [m:n]) let(idx = (n + (m - i))) __ra_to_xy(r_inner, a_step * idx) diff --git a/src/shape_pie.scad b/src/shape_pie.scad index 5d8b878f..fa393837 100644 --- a/src/shape_pie.scad +++ b/src/shape_pie.scad @@ -28,7 +28,7 @@ function shape_pie(radius, angle) = edge_r_end = leng / cos((n + 0.5) * a_step - angles[1]), shape_pts = concat( [[0, 0], __ra_to_xy(edge_r_begin, angles[0])], - m >= n ? [] : [ + m > n ? [] : [ for(i = [m:n]) let(a = a_step * i) __ra_to_xy(radius, a)