diff --git a/src/__comm__/__edge_r.scad b/src/__comm__/__edge_r.scad index 64ace0dc..c6492498 100644 --- a/src/__comm__/__edge_r.scad +++ b/src/__comm__/__edge_r.scad @@ -1,5 +1,7 @@ function __edge_r_begin(orig_r, a, a_step, m) = - (orig_r * cos(a_step / 2)) / cos((m - 0.5) * a_step - a); + let(half_a_step = a_step / 2) + orig_r * cos(half_a_step) / cos(m * a_step - half_a_step - a); -function __edge_r_end(orig_r, a, a_step, n) = - (orig_r * cos(a_step / 2)) / cos((n + 0.5) * a_step - a); \ No newline at end of file +function __edge_r_end(orig_r, a, a_step, n) = + let(half_a_step = a_step / 2) + orig_r * cos(half_a_step) / cos(n * a_step + half_a_step - a); \ No newline at end of file