summaryrefslogtreecommitdiffabout
path: root/fanduct.scad
authorMichael Krelin <hacker@klever.net>2016-06-13 16:01:15 (UTC)
committer Michael Krelin <hacker@klever.net>2016-06-13 16:01:15 (UTC)
commit1afb1ce3d5afc54358f94b19e45d73f382a8246a (patch) (side-by-side diff)
tree8d6d69884b968cc5fa131b5b6e5cf09da46a3922 /fanduct.scad
parentdb98325df397142e712aceca25a822c84a742b45 (diff)
downloadfanductory-1afb1ce3d5afc54358f94b19e45d73f382a8246a.zip
fanductory-1afb1ce3d5afc54358f94b19e45d73f382a8246a.tar.gz
fanductory-1afb1ce3d5afc54358f94b19e45d73f382a8246a.tar.bz2
dualism: no duct tails
for now
Diffstat (limited to 'fanduct.scad') (more/less context) (ignore whitespace changes)
-rw-r--r--fanduct.scad16
1 files changed, 10 insertions, 6 deletions
diff --git a/fanduct.scad b/fanduct.scad
index 1090e95..fc57c57 100644
--- a/fanduct.scad
+++ b/fanduct.scad
@@ -245,100 +245,104 @@ module fanduct(type=type,ductshape=ductshape,dual=dual) {
// *** air intake
module intake(what) {
module placeit() {
translate([-fanduct_ir-2*fanduct_shell-fanduct_w-inlet_away,0,fanduct_shell])
rotate([0,-90,0])
children();
}
if(what=="in") {
placeit() translate([0,-inlet_w/2,0]) {
difference() {
cube(size=[inlet_h,inlet_w,inlet_long_l+fanduct_shell]);
translate([inlet_h+fanduct_shell,0,inlet_long_l+fanduct_shell])
rotate([-90,0,0])
translate([0,0,-1])
cylinder(r=inlet_h,h=inlet_w+2*fanduct_shell+2,$fn=inlet_h*4);
}
// supports
for(i=[-1,0,1])
translate([-fanduct_shell,
(i+1)*(inlet_w-extrusion_width)/2,
-inlet_away-fanduct_w/2])
cube(size=[fanduct_shell,
extrusion_width,
inlet_long_l+fanduct_shell+inlet_away+fanduct_w/2]);
}
hull() {
placeit() translate([-fanduct_shell,-inlet_w/2-fanduct_shell,0])
cube(size=[inlet_h+2*fanduct_shell,inlet_w+2*fanduct_shell,fanduct_shell]);
translate([-fanduct_ir-fanduct_shell-fanduct_w/2,0,0])
translate([0,-inlet_w/2-fanduct_shell/2,0])
cube(size=[1,inlet_w+fanduct_shell,fanduct_shell*2+fanduct_h]);
}
}else if(what=="out") {
placeit() translate([fanduct_shell,-inlet_w/2+fanduct_shell,0])
cube(size=[inlet_h-2*fanduct_shell,inlet_w-2*fanduct_shell,inlet_long_l+fanduct_shell+1]);
hull() {
placeit() translate([fanduct_shell,-inlet_w/2+fanduct_shell,0])
cube(size=[inlet_h-2*fanduct_shell,inlet_w-2*fanduct_shell,fanduct_shell]);
translate([-fanduct_ir-fanduct_shell-fanduct_w/2,0,fanduct_shell])
translate([0,-inlet_w/2+fanduct_shell,0])
cube(size=[1,inlet_w-2*fanduct_shell,fanduct_h]);
}
}
}
// *** DUCT TAILS!!! WOO-OO! (every day they're out there making duct tails…)
module tails(what) {
- if(what=="in") {
- for(mx=[0,1]) mirror([mx,0,0])
- translate([fanduct_ir+fanduct_shell+fanduct_w/2,0,fanduct_shell+fanduct_h/2])
- rotate([90,0,90])
- translate([0,0,-snapper_d/2])
- snapper(d=snapper_d,o=snapper_overlap,side=0,l=fanduct_h*3/2+fanduct_shell);
+ if(dual) {
+ // XXX: not sure if it will ever be
+ }else{
+ if(what=="in") {
+ for(mx=[0,1]) mirror([mx,0,0])
+ translate([fanduct_ir+fanduct_shell+fanduct_w/2,0,fanduct_shell+fanduct_h/2])
+ rotate([90,0,90])
+ translate([0,0,-snapper_d/2])
+ snapper(d=snapper_d,o=snapper_overlap,side=0,l=fanduct_h*3/2+fanduct_shell);
+ }
}
}
module parts(what) {
union() {
duct(what);
marks(what);
output(what);
intake(what);
tails(what);
}
}
difference() {
parts("in");
parts("out");
}
intersection() {
union() {
output("airguides");
sphere(d=epsilon);
}
union() {
duct("in"); output("in"); intake("in");
}
}
}
view="*"; // hcut|vcut|*
hinfinity=4*(fanduct_ir+fanduct_shell*2+fanduct_w+inlet_away);
vinfinity=2*(fanduct_shell*2+fanduct_h+inlet_h);
if(view=="hcut") {
difference() {
fanduct();
translate([-hinfinity/2,-hinfinity/2,fanduct_shell+fanduct_h/2])
cube(size=[hinfinity,hinfinity,vinfinity]);
}
}else if(view=="vcut") {
difference() {
fanduct();
translate([-hinfinity/2,0,-vinfinity/2])
cube(size=[hinfinity,hinfinity,vinfinity]);
}
}else fanduct();
/* vim:set sw=1 ai: */