1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-29 17:30:11 +02:00
This commit is contained in:
Justin Lin
2020-01-11 14:07:56 +08:00
parent 64f39ff904
commit 943498700c

View File

@@ -1,10 +1,8 @@
function __shape_arc(radius, angle, width, width_mode = "LINE_CROSS") = function __shape_arc(radius, angle, width, width_mode = "LINE_CROSS") =
let( let(
w_offset = width_mode == "LINE_CROSS" ? [width / 2, -width / 2] : ( w_offset = width_mode == "LINE_CROSS" ? [width / 2, -width / 2] :
width_mode == "LINE_INWARD" ? [0, -width] : [width, 0] width_mode == "LINE_INWARD" ? [0, -width] : [width, 0],
), a_step = 360 / __frags(radius),
frags = __frags(radius),
a_step = 360 / frags,
half_a_step = a_step / 2, half_a_step = a_step / 2,
angles = is_num(angle) ? [0, angle] : angle, angles = is_num(angle) ? [0, angle] : angle,
m = floor(angles[0] / a_step) + 1, m = floor(angles[0] / a_step) + 1,