1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-01 20:40:28 +02:00

refactored

This commit is contained in:
Justin Lin
2017-06-05 15:30:21 +08:00
parent a881dbf896
commit ca2cbb67b9
2 changed files with 3 additions and 2 deletions

View File

@@ -47,7 +47,7 @@ module line3d(p1, p2, thickness, p1Style = "CAP_CIRCLE", p2Style = "CAP_CIRCLE")
module cap(p, style) {
if(style == "CAP_CIRCLE") {
cap_leng = r / 1.414;
cap_with(p) `
cap_with(p)
linear_extrude(cap_leng * 2, center = true)
circle(r, $fn = frags);
@@ -63,6 +63,7 @@ module line3d(p1, p2, thickness, p1Style = "CAP_CIRCLE", p2Style = "CAP_CIRCLE")
}
}
cap_butt();
cap(p1, p1Style);
cap(p2, p2Style);