Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
WebWeaver
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
fxk8y
WebWeaver
Commits
f37f34c0
Commit
f37f34c0
authored
3 years ago
by
fxk8y
Browse files
Options
Downloads
Patches
Plain Diff
Adding inner/outer volume switches to remaining pipe sections
parent
a5114a48
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scad/piping/pipes.scad
+12
-11
12 additions, 11 deletions
scad/piping/pipes.scad
with
12 additions
and
11 deletions
scad/piping/pipes.scad
+
12
−
11
View file @
f37f34c0
...
...
@@ -41,19 +41,19 @@ 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, centerX=false, centerY=false) {
module cornerPipeLayOnFace(width, height, diameter, angle, radius, strength, center=false, centerX=false, centerY=false
, inner=true, outer=true
) {
tx = center || centerX ? -height/2 : 0;
ty = center || centerY ? -width/2 : 0;
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);
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
, inner=inner, outer=outer
);
}
// cornerPipe(20, 10, 5, 90, 1, 1, true);
// Not what I wanted to code - but may come in handy anywhere in the future…
module helixPipe(width, height, length, diameter, angle, radius, strength, center=false) {
module helixPipe(width, height, length, diameter, angle, radius, strength, center=false
, inner=true, outer=true
) {
w = width;
h = height;
l = length;
...
...
@@ -64,8 +64,8 @@ module helixPipe(width, height, length, diameter, angle, radius, strength, cente
tz = center ? 0 : h/2;
translate([0, 0, tz]) linear_extrude(l, twist=a, convexity=8) translate([0, 0, 0]) difference() {
roundRect(w, h, r, center=true);
roundRect(w - _str*2, h - _str*2, r - _str, center=true);
if (outer)
roundRect(w, h, r, center=true);
if (inner)
roundRect(w - _str*2, h - _str*2, r - _str, center=true);
}
}
...
...
@@ -75,7 +75,8 @@ module helixPipe(width, height, length, diameter, angle, radius, strength, cente
// TODO: documentation!
module adapterPipe(
w0, h0, r0, str0, w1, h1, r1, str1,
length, x_off=0, y_off=0, center=false
length, x_off=0, y_off=0,
center=false, inner=true, outer=true
) {
l = length;
...
...
@@ -84,13 +85,13 @@ module adapterPipe(
difference() {
// outer shell
hull() {
if (outer)
hull() {
linear_extrude(epsilon) roundRect(w0, h0, r0, center=true);
translate([x_off, y_off, l - epsilon]) linear_extrude(epsilon) roundRect(w1, h1, r1, center=true);
}
// inner hole
hull() {
if (inner)
hull() {
linear_extrude(epsilon) roundRect(w0 - str0*2, h0 - str0*2, r0 - str0, center=true);
translate([x_off, y_off, l - epsilon]) linear_extrude(epsilon) roundRect(w1 - str1*2, h1 - str1*2, r1 - str1, center=true);
}
...
...
@@ -102,7 +103,7 @@ module adapterPipe(
// N is the number of pipe endings
// length means length of each pipe measured from the centre
module crossNPipe(width, height, length, radius, strength, N, center=false) {
module crossNPipe(width, height, length, radius, strength, N, center=false
, inner=true, outer=true
) {
w = width;
h = height;
l = length;
...
...
@@ -114,11 +115,11 @@ module crossNPipe(width, height, length, radius, strength, N, center=false) {
tz = center ? h/2 : 0;
translate([0, 0, tz]) difference() {
for (rz=[0:360/N:360]) rotate([-90, 0, rz]) linear_extrude(l) {
if (outer)
for (rz=[0:360/N:360]) rotate([-90, 0, rz]) linear_extrude(l) {
roundRect(w, h, r, center=true);
}
for (rz=[0:360/N:360]) rotate([-90, 0, rz]) linear_extrude(l + epsilon) {
if (inner)
for (rz=[0:360/N:360]) rotate([-90, 0, rz]) linear_extrude(l + epsilon) {
roundRect(w - _str*2, h - _str*2, r - _str, center=true);
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment