From 2b84ba046a8508aa31563ded334485a3a543f30e Mon Sep 17 00:00:00 2001
From: Jochen Vothknecht <jochen3120@gmail.com>
Date: Sun, 26 Sep 2021 21:18:52 +0200
Subject: [PATCH] Piping adjustment

---
 scad/piping/pipes.scad | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/scad/piping/pipes.scad b/scad/piping/pipes.scad
index 42feb23..0d53901 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);
-- 
GitLab