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) (unidiff) | |
tree | a976223bd80e8370c3e4773affe85289ba7eb300 | |
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 | |||
@@ -36,13 +36,15 @@ module fanduct(type=type) { | |||
36 | if(what=="in") { | 36 | if(what=="in") { |
37 | sh = fanduct_w+2*fanduct_shell; sv = fanduct_h+2*fanduct_shell; | ||
38 | smax = max(sh,sv); | ||
37 | rotate_extrude($fn=smooth_f) | 39 | rotate_extrude($fn=smooth_f) |
38 | translate([fanduct_ir,0]) | 40 | translate([sh/2+fanduct_ir,sv/2]) |
39 | square([fanduct_w+2*fanduct_shell,fanduct_h+2*fanduct_shell]); | 41 | scale([sh/smax,sv/smax]) |
42 | circle(d=smax,$fn=4*smax); | ||
40 | }else if(what=="out") { | 43 | }else if(what=="out") { |
44 | sh = fanduct_w; sv = fanduct_h; | ||
45 | smax = max(sh,sv); | ||
41 | rotate_extrude($fn=smooth_f) | 46 | rotate_extrude($fn=smooth_f) |
42 | translate([fanduct_ir+fanduct_shell,fanduct_shell]) | 47 | translate([sh/2+fanduct_shell+fanduct_ir,sv/2+fanduct_shell]) |
43 | union() { | 48 | scale([sh/smax,sv/smax]) |
44 | square([fanduct_w,fanduct_h/2]); | 49 | circle(d=smax,$fn=4*smax); |
45 | translate([fanduct_w/2,fanduct_h-fanduct_w/2]) | ||
46 | rotate([0,0,90]) circle(d=fanduct_w,$fn=36); | ||
47 | } | ||
48 | } | 50 | } |