author | Michael Krelin <hacker@klever.net> | 2016-05-29 21:12:15 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2016-05-29 21:12:15 (UTC) |
commit | 1bc06881cec07ceaafc0b98310b2424feda5f354 (patch) (side-by-side diff) | |
tree | a976223bd80e8370c3e4773affe85289ba7eb300 /fanduct.scad | |
parent | 255f4886db8797a9b1c8079f6a166e92e4eb1f4c (diff) | |
download | fanductory-1bc06881cec07ceaafc0b98310b2424feda5f354.zip fanductory-1bc06881cec07ceaafc0b98310b2424feda5f354.tar.gz fanductory-1bc06881cec07ceaafc0b98310b2424feda5f354.tar.bz2 |
toroidal duct
-rw-r--r-- | fanduct.scad | 18 |
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 @@ -29,27 +29,29 @@ smooth_f = 120; type="3jets"; // "3jets" ; // circular|3jets 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 module marks(what) { if(what=="in") { for(y=[-1,1]) hull() for(z=[0,-fanduct_shell-fanduct_h/2]) |