mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-07 15:26:39 +02:00
extracted out __frags
This commit is contained in:
3
src/__private__/__frags.scad
Normal file
3
src/__private__/__frags.scad
Normal file
@@ -0,0 +1,3 @@
|
||||
function __frags(radius) = $fn > 0 ?
|
||||
($fn >= 3 ? $fn : 3) :
|
||||
max(min(360 / $fa, radius * 6.28318 / $fs), 5);
|
@@ -12,11 +12,11 @@
|
||||
*
|
||||
**/
|
||||
|
||||
include <__private__/__frags.scad>;
|
||||
|
||||
function circle_path(radius, n) =
|
||||
let(
|
||||
_frags = $fn > 0 ?
|
||||
($fn >= 3 ? $fn : 3) :
|
||||
max(min(360 / $fa, radius * 6.28318 / $fs), 5),
|
||||
_frags = __frags(radius),
|
||||
step_a = 360 / _frags,
|
||||
end_a = 360 - step_a * ((n == undef || n > _frags) ? 1 : _frags - n + 1)
|
||||
)
|
||||
|
Reference in New Issue
Block a user