1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-04-21 14:41:51 +02:00

fixed end angle problems

This commit is contained in:
Justin Lin 2017-05-24 18:47:54 +08:00
parent c16b554350
commit 4e3c6681f4
2 changed files with 3 additions and 3 deletions

View File

@ -47,9 +47,9 @@ module arc(radius, angle, width, width_mode = "LINE_CROSS") {
// 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)],
[__ra_to_xy(edge_r_end(r_outer, angles[1]), angles[1])],
angles[1] == a_step * n ? [] : [__ra_to_xy(edge_r_end(r_outer, angles[1]), angles[1])],
// inner arc path
[__ra_to_xy(edge_r_end(r_inner, angles[1]), angles[1])],
angles[1] == a_step * n ? [] : [__ra_to_xy(edge_r_end(r_inner, angles[1]), angles[1])],
m >= n ? [] : [
for(i = [m:n])
let(idx = (n + (m - i)))

View File

@ -35,7 +35,7 @@ module pie(radius, angle) {
points = concat(
[[0, 0], __ra_to_xy(edge_r_begin(angles[0]), angles[0])],
m >= n ? [] : [for(i = [m:n]) __ra_to_xy(radius, a_step * i)],
[__ra_to_xy(edge_r_end(angles[1]), angles[1])]
angles[1] == a_step * n ? [] : [__ra_to_xy(edge_r_end(angles[1]), angles[1])]
);
polygon(points);