author | Michael Krelin <hacker@klever.net> | 2016-06-11 14:08:31 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2016-06-11 14:08:31 (UTC) |
commit | 0398dd6a4e41ec26d48ad02caffc319f34cbfcb1 (patch) (unidiff) | |
tree | 6b5c5cb97ac2ad98179ebddd5db08757994eaa29 | |
parent | 81e4c02f584b5404628cda56502d0eedbc93b8f1 (diff) | |
download | fanductory-0398dd6a4e41ec26d48ad02caffc319f34cbfcb1.zip fanductory-0398dd6a4e41ec26d48ad02caffc319f34cbfcb1.tar.gz fanductory-0398dd6a4e41ec26d48ad02caffc319f34cbfcb1.tar.bz2 |
selectable round/square duct section
-rw-r--r-- | fanduct.scad | 29 |
1 files changed, 21 insertions, 8 deletions
diff --git a/fanduct.scad b/fanduct.scad index 53630a3..746f753 100644 --- a/fanduct.scad +++ b/fanduct.scad | |||
@@ -29,32 +29,45 @@ hotend_clearance = heater_clearance; | |||
29 | 29 | ||
30 | snapper_d = 8; snapper_overlap=0.2;// snip snap | 30 | snapper_d = 8; snapper_overlap=0.2;// snip snap |
31 | 31 | ||
32 | smooth_f = 120; | 32 | smooth_f = 120; |
33 | 33 | ||
34 | type="3jets"; // "3jets" ; // circular|3jets | 34 | type="3jets"; // "3jets" ; // circular|3jets |
35 | ductshape="square"; // square|round | ||
35 | 36 | ||
36 | 37 | ||
37 | module fanduct(type=type) { | 38 | module fanduct(type=type,ductshape=ductshape) { |
38 | 39 | ||
39 | // ***duct is all around! | 40 | // ***duct is all around! |
40 | module duct(what) { | 41 | module duct(what) { |
41 | if(what=="in") { | 42 | if(what=="in") { |
42 | sh = fanduct_w+2*fanduct_shell; sv = fanduct_h+2*fanduct_shell; | 43 | sh = fanduct_w+2*fanduct_shell; sv = fanduct_h+2*fanduct_shell; |
43 | smax = max(sh,sv); | 44 | smax = max(sh,sv); |
44 | rotate_extrude($fn=smooth_f) | 45 | rotate_extrude($fn=smooth_f) |
45 | translate([sh/2+fanduct_ir,sv/2]) | 46 | if(ductshape=="round") |
46 | scale([sh/smax,sv/smax]) | 47 | translate([sh/2+fanduct_ir,sv/2]) |
47 | circle(d=smax,$fn=4*smax); | 48 | scale([sh/smax,sv/smax]) |
49 | circle(d=smax,$fn=4*smax); | ||
50 | else if(ductshape=="square") | ||
51 | translate([fanduct_ir,0]) | ||
52 | square([sh,sv]); | ||
48 | }else if(what=="out") { | 53 | }else if(what=="out") { |
49 | sh = fanduct_w; sv = fanduct_h; | 54 | sh = fanduct_w; sv = fanduct_h; |
50 | smax = max(sh,sv); | 55 | smax = max(sh,sv); |
51 | rotate_extrude($fn=smooth_f) | 56 | rotate_extrude($fn=smooth_f) |
52 | translate([sh/2+fanduct_shell+fanduct_ir,sv/2+fanduct_shell]) | 57 | if(ductshape=="round") |
53 | scale([sh/smax,sv/smax]) | 58 | translate([sh/2+fanduct_shell+fanduct_ir,sv/2+fanduct_shell]) |
54 | circle(d=smax,$fn=4*smax); | 59 | scale([sh/smax,sv/smax]) |
60 | circle(d=smax,$fn=4*smax); | ||
61 | else if(ductshape=="square") | ||
62 | translate([fanduct_ir+fanduct_shell,fanduct_shell]) | ||
63 | union() { | ||
64 | square([fanduct_w,fanduct_h/2]); | ||
65 | translate([fanduct_w/2,fanduct_h-fanduct_w/2]) | ||
66 | rotate([0,0,90]) circle(d=fanduct_w,$fn=36); | ||
67 | } | ||
55 | } | 68 | } |
56 | } | 69 | } |
57 | 70 | ||
58 | // ***bumps for easier position adjustments in line with hotend | 71 | // ***bumps for easier position adjustments in line with hotend |
59 | module marks(what) { | 72 | module marks(what) { |
60 | if(what=="in") { | 73 | if(what=="in") { |
@@ -237,13 +250,13 @@ module fanduct(type=type) { | |||
237 | union() { | 250 | union() { |
238 | duct("in"); output("in"); intake("in"); | 251 | duct("in"); output("in"); intake("in"); |
239 | } | 252 | } |
240 | } | 253 | } |
241 | } | 254 | } |
242 | 255 | ||
243 | view="full"; // hcut|vcut|* | 256 | view="vcut"; // hcut|vcut|* |
244 | 257 | ||
245 | hinfinity=4*(fanduct_ir+fanduct_shell*2+fanduct_w+inlet_away); | 258 | hinfinity=4*(fanduct_ir+fanduct_shell*2+fanduct_w+inlet_away); |
246 | vinfinity=2*(fanduct_shell*2+fanduct_h+inlet_h); | 259 | vinfinity=2*(fanduct_shell*2+fanduct_h+inlet_h); |
247 | if(view=="hcut") { | 260 | if(view=="hcut") { |
248 | difference() { | 261 | difference() { |
249 | fanduct(); | 262 | fanduct(); |