summaryrefslogtreecommitdiffabout
path: root/fanduct.scad
Side-by-side diff
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