Added a rectangular tube.

This commit is contained in:
Martin Budden 2021-01-17 16:34:09 +00:00
parent c33876530e
commit bd2ea3f284
2 changed files with 11 additions and 0 deletions

View File

@ -27,6 +27,9 @@ module tubes() {
translate([50, 10]) translate([50, 10])
tube(10, 8, 30); tube(10, 8, 30);
translate([100, 10])
rectangular_tube([10, 20, 30]);
} }
tubes(); tubes();

View File

@ -68,3 +68,11 @@ module woven_tube(or, ir, h, center= true, colour = grey(30), colour2, warp = 2,
} }
} }
} }
module rectangular_tube(size, center = true, thickness = 1, fillet = 0.5) {
extrude_if(size.z, center = center)
difference() {
rounded_square([size.x, size.y], fillet);
rounded_square([size.x - 2 * thickness, size.y - 2 * thickness], fillet);
}
}