1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-11 17:24:20 +02:00

added hooks

This commit is contained in:
Justin Lin
2017-05-26 10:13:39 +08:00
parent a667ab23fe
commit 124fa40165

View File

@@ -25,12 +25,18 @@ module line2d(p1, p2, width, p1Style = "CAP_SQUARE", p2Style = "CAP_SQUARE") {
translate(point) translate(point)
rotate(atan_angle) rotate(atan_angle)
square(width, center = true); square(width, center = true);
// hook for testing
cap(point, "CAP_SQUARE");
} }
module round_end(point) { module round_end(point) {
translate(point) translate(point)
rotate(atan_angle) rotate(atan_angle)
circle(half_width, center = true, $fn = frags); circle(half_width, center = true, $fn = frags);
// hook for testing
cap(point, "CAP_ROUND");
} }
if(p1Style == "CAP_SQUARE") { if(p1Style == "CAP_SQUARE") {
@@ -54,6 +60,11 @@ module line2d(p1, p2, width, p1Style = "CAP_SQUARE", p2Style = "CAP_SQUARE") {
test_line2d_line(atan_angle, leng, width, frags); test_line2d_line(atan_angle, leng, width, frags);
} }
module cap(point, style) {
}
module test_line2d_line(angle, length, width, frags) { module test_line2d_line(angle, length, width, frags) {
echo(angle, length, width, frags); echo(angle, length, width, frags);
} }