1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-07-31 20:10:36 +02:00

fixed radius error

This commit is contained in:
Justin Lin
2017-03-25 15:31:28 +08:00
parent 4aa8da1090
commit a96fc7cf17

View File

@@ -11,13 +11,13 @@
**/ **/
module line3d(p1, p2, thickness, p1Style = "CAP_CIRCLE", p2Style = "CAP_CIRCLE") { module line3d(p1, p2, thickness, p1Style = "CAP_CIRCLE", p2Style = "CAP_CIRCLE") {
r = thickness / 2;
frags = $fn > 0 ? frags = $fn > 0 ?
($fn >= 3 ? $fn : 3) : ($fn >= 3 ? $fn : 3) :
max(min(360 / $fa, radius * 2 * 3.14159 / $fs), 5) max(min(360 / $fa, r * 2 * 3.14159 / $fs), 5)
; ;
r = thickness / 2;
dx = p2[0] - p1[0]; dx = p2[0] - p1[0];
dy = p2[1] - p1[1]; dy = p2[1] - p1[1];
dz = p2[2] - p1[2]; dz = p2[2] - p1[2];