diff --git a/include/short.scad b/include/short.scad new file mode 100644 index 0000000000000000000000000000000000000000..508c750c0f54bd1fcb5dda1194022836cdc6a6c1 --- /dev/null +++ b/include/short.scad @@ -0,0 +1,27 @@ +module tX(x) { translate([x,0,0]) children(); } +module tY(y) { translate([0,y,0]) children(); } +module tZ(z) { translate([0,0,z]) children(); } +module tXY(x,y) { translate([x,y,0]) children(); } +module tXZ(x,z) { translate([x,0,z]) children(); } +module tYZ(y,z) { translate([0,y,z]) children(); } +module tXYZ(x,y,z) { translate([x,y,z]) children(); } + +module rX(x) { rotate([x,0,0]) children(); } +module rY(y) { rotate([0,y,0]) children(); } +module rZ(z) { rotate([0,0,z]) children(); } + +// operations +module diff() { + difference() { + children(0); + // step needed in case $children < 2 + for (i=[1:1:$children-1]) children(i); + } +} + +module tube(l, th) { + linear_extrude(l) diff() { + offset(2*th) children(); + children(); + } +}