1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-01 04:20:27 +02:00
This commit is contained in:
Justin Lin
2017-05-24 20:14:02 +08:00
parent 54f2001c43
commit f2cc2693fc
3 changed files with 5 additions and 5 deletions

View File

@@ -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)

View File

@@ -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)

View File

@@ -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)