diff --git a/scad/piping/pipes.scad b/scad/piping/pipes.scad index 42feb232a50f953a0a71c99639815825500bd9e8..0d53901c9d0a3af557c61d57888910e38cfa5fd4 100644 --- a/scad/piping/pipes.scad +++ b/scad/piping/pipes.scad @@ -39,12 +39,14 @@ module cornerPipe(width, height, diameter, angle, radius, strength, center=false } } + // TODO: LayOnFace? Use a better name maybe…? -module cornerPipeLayOnFace(width, height, diameter, angle, radius, strength, center=false) { +module cornerPipeLayOnFace(width, height, diameter, angle, radius, strength, center=false, centerX=false, centerY=false) { - ty = diameter/2 + height/2; + tx = center || centerX ? -height/2 : 0; + ty = center || centerY ? -width/2 : 0; - translate([0, ty, 0]) rotate([90, 0, -90]) cornerPipe(width=width, height=height, diameter=diameter, angle=angle, radius=radius, strength=strength, center=center); + translate([tx + height, ty + width + diameter/2, 0]) rotate([90, 0, -90]) cornerPipe(width=width, height=height, diameter=diameter, angle=angle, radius=radius, strength=strength, center=center); } // cornerPipe(20, 10, 5, 90, 1, 1, true);