mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-29 01:11:30 +02:00
refactor
This commit is contained in:
@@ -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,
|
||||||
|
Reference in New Issue
Block a user