Skip to content

Instantly share code, notes, and snippets.

Avatar

Hans Loeblich thehans

View GitHub Profile
View Builtin.scad
GRID_FINE=0.000001;
M_PI=3.14159265358979323846;
function getFragments(r,fn,fs,fa) =
(r < GRID_FINE)?3:
(fn > 0.0)?(fn >= 3 ? fn : 3):
ceil(max(min(360.0 / fa, r*2*M_PI / fs), 5));
function getPhi(i,f) = (i*360)/f;
function getCircle_x(r,i,f) = r*sin(getPhi(i,f));
You can’t perform that action at this time.