mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-28 17:00:00 +02:00
added test hook
This commit is contained in:
@@ -39,6 +39,9 @@ module line3d(p1, p2, thickness, p1Style = "CAP_CIRCLE", p2Style = "CAP_CIRCLE")
|
||||
cap_with(p1)
|
||||
linear_extrude(length)
|
||||
circle(r, $fn = frags);
|
||||
|
||||
// hook for testing
|
||||
test_line3d_butt(p1, r, frags, length, angles);
|
||||
}
|
||||
|
||||
module cap(p, style) {
|
||||
@@ -47,10 +50,16 @@ module line3d(p1, p2, thickness, p1Style = "CAP_CIRCLE", p2Style = "CAP_CIRCLE")
|
||||
cap_with(p)
|
||||
linear_extrude(cap_leng * 2, center = true)
|
||||
circle(r, $fn = frags);
|
||||
|
||||
// hook for testing
|
||||
test_line3d_cap(p, r, frags, cap_leng, angles);
|
||||
} else if(style == "CAP_SPHERE") {
|
||||
cap_leng = r / cos(half_fa);
|
||||
cap_with(p)
|
||||
sphere(cap_leng, $fn = frags);
|
||||
|
||||
// hook for testing
|
||||
test_line3d_cap(p, r, frags, cap_leng, angles);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,3 +67,12 @@ module line3d(p1, p2, thickness, p1Style = "CAP_CIRCLE", p2Style = "CAP_CIRCLE")
|
||||
cap(p1, p1Style);
|
||||
cap(p2, p2Style);
|
||||
}
|
||||
|
||||
// Override them to test
|
||||
module test_line3d_butt(p, r, frags, length, angles) {
|
||||
|
||||
}
|
||||
|
||||
module test_line3d_cap(p, r, frags, cap_leng, angles) {
|
||||
|
||||
}
|
Reference in New Issue
Block a user