mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-01-17 14:18:13 +01:00
replace fn with frags
This commit is contained in:
parent
a4b51e0ad9
commit
f4fba0fbe9
@ -11,6 +11,11 @@
|
||||
**/
|
||||
|
||||
module line3d(p1, p2, thickness, p1Style = "CAP_CIRCLE", p2Style = "CAP_CIRCLE") {
|
||||
frags = $fn > 0 ?
|
||||
($fn >= 3 ? $fn : 3) :
|
||||
max(min(360 / $fa, radius * 2 * 3.14159 / $fs), 5)
|
||||
;
|
||||
|
||||
r = thickness / 2;
|
||||
|
||||
dx = p2[0] - p1[0];
|
||||
@ -49,7 +54,7 @@ module line3d(p1, p2, thickness, p1Style = "CAP_CIRCLE", p2Style = "CAP_CIRCLE")
|
||||
if(style == "CAP_CIRCLE") {
|
||||
capCube(p);
|
||||
} else if(style == "CAP_SPHERE") {
|
||||
if(fn > 4) {
|
||||
if(frags > 4) {
|
||||
capSphere(p);
|
||||
} else {
|
||||
capCube(p);
|
||||
|
Loading…
x
Reference in New Issue
Block a user