Skip to content
Snippets Groups Projects
Commit 771a6264 authored by fxk8y's avatar fxk8y :spider:
Browse files

Add center option to corner pipe

parent 6d407c70
No related branches found
No related tags found
No related merge requests found
...@@ -286,7 +286,9 @@ module straightPipe(width, height, length, radius, strength, center=false) { ...@@ -286,7 +286,9 @@ module straightPipe(width, height, length, radius, strength, center=false) {
// straightPipe(20, 10, 30, 1, 1); // straightPipe(20, 10, 30, 1, 1);
module cornerPipe(width, height, diameter, angle, radius, strength /* , center=false */) { // center only applies to Z-axis
// TODO: write documentation!
module cornerPipe(width, height, diameter, angle, radius, strength, center=false) {
w = width; w = width;
h = height; h = height;
d = diameter; // "size" of the corner. inner diameter of where it is virtually wound onto d = diameter; // "size" of the corner. inner diameter of where it is virtually wound onto
...@@ -294,14 +296,15 @@ module cornerPipe(width, height, diameter, angle, radius, strength /* , center=f ...@@ -294,14 +296,15 @@ module cornerPipe(width, height, diameter, angle, radius, strength /* , center=f
r = radius; r = radius;
_str = strength; _str = strength;
tz = center ? 0 : h/2;
rotate_extrude(angle=a, convexity=8) translate([w/2 + d/2, 0, 0]) difference() { translate([0, 0, tz]) rotate_extrude(angle=a, convexity=8) translate([w/2 + d/2, 0, 0]) difference() {
roundRect(w, h, r); roundRect(w, h, r);
roundRect(w - _str*2, h - _str*2, r - _str); roundRect(w - _str*2, h - _str*2, r - _str);
} }
} }
cornerPipe(20, 10, 5, 90, 1, 1); cornerPipe(20, 10, 5, 90, 1, 1, true);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment