1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-01-17 14:18:13 +01: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);

View File

@ -110,5 +110,5 @@ module round_echo_pts(points, float_digits = 4) {
}
module round_echo_n(number, float_digits = 4) {
echo(round_n(number, float_digits));
echo(round_n(number, float_digits));
}