summaryrefslogtreecommitdiffabout
path: root/fanduct.scad
authorMichael Krelin <hacker@klever.net>2016-05-29 21:12:15 (UTC)
committer Michael Krelin <hacker@klever.net>2016-05-29 21:12:15 (UTC)
commit1bc06881cec07ceaafc0b98310b2424feda5f354 (patch) (side-by-side diff)
treea976223bd80e8370c3e4773affe85289ba7eb300 /fanduct.scad
parent255f4886db8797a9b1c8079f6a166e92e4eb1f4c (diff)
downloadfanductory-1bc06881cec07ceaafc0b98310b2424feda5f354.zip
fanductory-1bc06881cec07ceaafc0b98310b2424feda5f354.tar.gz
fanductory-1bc06881cec07ceaafc0b98310b2424feda5f354.tar.bz2
toroidal duct
Diffstat (limited to 'fanduct.scad') (more/less context) (ignore whitespace changes)
-rw-r--r--fanduct.scad18
1 files changed, 10 insertions, 8 deletions
diff --git a/fanduct.scad b/fanduct.scad
index a843023..41048bf 100644
--- a/fanduct.scad
+++ b/fanduct.scad
@@ -33,19 +33,21 @@ module fanduct(type=type) {
// *** duct is all around!
module duct(what) {
if(what=="in") {
+ sh = fanduct_w+2*fanduct_shell; sv = fanduct_h+2*fanduct_shell;
+ smax = max(sh,sv);
rotate_extrude($fn=smooth_f)
- translate([fanduct_ir,0])
- square([fanduct_w+2*fanduct_shell,fanduct_h+2*fanduct_shell]);
+ translate([sh/2+fanduct_ir,sv/2])
+ scale([sh/smax,sv/smax])
+ circle(d=smax,$fn=4*smax);
}else if(what=="out") {
+ sh = fanduct_w; sv = fanduct_h;
+ smax = max(sh,sv);
rotate_extrude($fn=smooth_f)
- translate([fanduct_ir+fanduct_shell,fanduct_shell])
- union() {
- square([fanduct_w,fanduct_h/2]);
- translate([fanduct_w/2,fanduct_h-fanduct_w/2])
- rotate([0,0,90]) circle(d=fanduct_w,$fn=36);
- }
+ translate([sh/2+fanduct_shell+fanduct_ir,sv/2+fanduct_shell])
+ scale([sh/smax,sv/smax])
+ circle(d=smax,$fn=4*smax);
}
}
// *** bumps for easier position adjustments in line with hotend