summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--fanduct.scad29
1 files changed, 28 insertions, 1 deletions
diff --git a/fanduct.scad b/fanduct.scad
index b9689c9..0cd89f7 100644
--- a/fanduct.scad
+++ b/fanduct.scad
@@ -23,295 +23,322 @@ jet_angle = 60-2; // angular width of the jet
23 inlet_w = 12.5; // inlet width 23 inlet_w = 12.5; // inlet width
24 inlet_h = 17; // inlet height 24 inlet_h = 17; // inlet height
25 inlet_short_l = 7;// inlet length of protrusion (or depth of intrusion:)) 25 inlet_short_l = 7;// inlet length of protrusion (or depth of intrusion:))
26 inlet_away = 15;// how far away inlet is 26 inlet_away = 15;// how far away inlet is
27 27
28inlet_long_l = inlet_short_l+inlet_h; 28inlet_long_l = inlet_short_l+inlet_h;
29hotend_clearance = heater_clearance; 29hotend_clearance = heater_clearance;
30 30
31 nozzles_apart = 18; // distance between nozzles for dual hotend 31 nozzles_apart = 18; // distance between nozzles for dual hotend
32 space_behind_nozzle = 15;// space behind the nozzle where we're allowed to go 32 space_behind_nozzle = 15;// space behind the nozzle where we're allowed to go
33 // without the fear of hitting carriage 33 // without the fear of hitting carriage
34 34
35 snapper_d = 8; snapper_overlap=0.2;// snip snap 35 snapper_d = 8; snapper_overlap=0.2;// snip snap
36 36
37smooth_f = 120; 37smooth_f = 120;
38 38
39 type="circular"; // circular|3jets 39 type="circular"; // circular|3jets
40 ductshape="square"; // square|round 40 ductshape="square"; // square|round
41 dual=true; // dual or single 41 dual=true; // dual or single
42 42
43to_midduct = fanduct_ir+fanduct_shell+fanduct_w/2; 43to_midduct = fanduct_ir+fanduct_shell+fanduct_w/2;
44dual_spots = [ [+space_behind_nozzle, -(to_midduct+nozzles_apart/2)], 44dual_spots = [ [+space_behind_nozzle, -(to_midduct+nozzles_apart/2)],
45 [- to_midduct, -(to_midduct+nozzles_apart/2)], 45 [- to_midduct, -(to_midduct+nozzles_apart/2)],
46 [- to_midduct, 0] ]; 46 [- to_midduct, 0] ];
47 47
48module fanduct(type=type,ductshape=ductshape,dual=dual) { 48module fanduct(type=type,ductshape=ductshape,dual=dual) {
49 // ***duct is all around! 49 // ***duct is all around!
50 module duct(what) { 50 module duct(what) {
51 module single() { 51 module single() {
52 if(what=="in") { 52 if(what=="in") {
53 sh = fanduct_w+2*fanduct_shell; sv = fanduct_h+2*fanduct_shell; 53 sh = fanduct_w+2*fanduct_shell; sv = fanduct_h+2*fanduct_shell;
54 smax = max(sh,sv); 54 smax = max(sh,sv);
55 rotate_extrude($fn=smooth_f) 55 rotate_extrude($fn=smooth_f)
56 if(ductshape=="round") 56 if(ductshape=="round")
57 translate([sh/2+fanduct_ir,sv/2]) 57 translate([sh/2+fanduct_ir,sv/2])
58 scale([sh/smax,sv/smax]) 58 scale([sh/smax,sv/smax])
59 circle(d=smax,$fn=4*smax); 59 circle(d=smax,$fn=4*smax);
60 else if(ductshape=="square") 60 else if(ductshape=="square")
61 translate([fanduct_ir,0]) 61 translate([fanduct_ir,0])
62 square([sh,sv]); 62 square([sh,sv]);
63 }else if(what=="out") { 63 }else if(what=="out") {
64 sh = fanduct_w; sv = fanduct_h; 64 sh = fanduct_w; sv = fanduct_h;
65 smax = max(sh,sv); 65 smax = max(sh,sv);
66 rotate_extrude($fn=smooth_f) 66 rotate_extrude($fn=smooth_f)
67 if(ductshape=="round") 67 if(ductshape=="round")
68 translate([sh/2+fanduct_shell+fanduct_ir,sv/2+fanduct_shell]) 68 translate([sh/2+fanduct_shell+fanduct_ir,sv/2+fanduct_shell])
69 scale([sh/smax,sv/smax]) 69 scale([sh/smax,sv/smax])
70 circle(d=smax,$fn=4*smax); 70 circle(d=smax,$fn=4*smax);
71 else if(ductshape=="square") 71 else if(ductshape=="square")
72 translate([fanduct_ir+fanduct_shell,fanduct_shell]) 72 translate([fanduct_ir+fanduct_shell,fanduct_shell])
73 union() { 73 union() {
74 square([sh,sv/2]); 74 square([sh,sv/2]);
75 translate([sh/2,sv/2]) 75 translate([sh/2,sv/2])
76 scale([sh/smax,sv/smax]) 76 scale([sh/smax,sv/smax])
77 circle(d=smax,$fn=36); 77 circle(d=smax,$fn=36);
78 } 78 }
79 } 79 }
80 } 80 }
81 module dual() { 81 module dual() {
82 module hulls(spots=dual_spots) { 82 module hulls(spots=dual_spots) {
83 for(my=[0,1]) mirror([0,my,0]) for(pn=[0:1:len(spots)-2]) hull() { 83 for(my=[0,1]) mirror([0,my,0]) for(pn=[0:1:len(spots)-2]) hull() {
84 for(p=[spots[pn],spots[pn+1]]) translate(p) children(); 84 for(p=[spots[pn],spots[pn+1]]) translate(p) children();
85 } 85 }
86 } 86 }
87 if(what=="in") { 87 if(what=="in") {
88 hulls() cylinder(d=fanduct_w+2*fanduct_shell,h=fanduct_h+2*fanduct_shell); 88 hulls() cylinder(d=fanduct_w+2*fanduct_shell,h=fanduct_h+2*fanduct_shell);
89 }else if(what=="out") { 89 }else if(what=="out") {
90 sh = fanduct_w; sv = fanduct_h; 90 sh = fanduct_w; sv = fanduct_h;
91 smax = max(sh,sv); 91 smax = max(sh,sv);
92 translate([0,0,fanduct_shell]) hulls() { 92 translate([0,0,fanduct_shell]) hulls() {
93 cylinder(d=fanduct_w,h=fanduct_h/2); 93 cylinder(d=fanduct_w,h=fanduct_h/2);
94 translate([0,0,fanduct_h/2]) 94 translate([0,0,fanduct_h/2])
95 scale([sh/smax,sh/smax,sv/smax]) 95 scale([sh/smax,sh/smax,sv/smax])
96 intersection() { 96 intersection() {
97 sphere(d=smax,$fn=36); 97 sphere(d=smax,$fn=36);
98 translate([0,0,-1]) 98 translate([0,0,-1])
99 cylinder(d=smax+2,h=smax+2,$fn=36); 99 cylinder(d=smax+2,h=smax+2,$fn=36);
100 } 100 }
101 } 101 }
102 } 102 }
103 } 103 }
104 104
105 if(dual) dual(); 105 if(dual) dual();
106 else single(); 106 else single();
107 } 107 }
108 108
109 // ***bumps for easier position adjustments in line with hotend 109 // ***bumps for easier position adjustments in line with hotend
110 module marks(what) { 110 module marks(what) {
111 if(what=="in") { 111 if(what=="in") {
112 for(y=[-1,1]) 112 for(y=[-1,1])
113 hull() for(z=[0,-fanduct_shell-fanduct_h/2]) 113 hull() for(z=[0,-fanduct_shell-fanduct_h/2])
114 translate([0,y*(fanduct_ir+fanduct_shell+fanduct_w/2),fanduct_shell*2+fanduct_h+z]) 114 translate([0,y*(fanduct_ir+fanduct_shell+fanduct_w/2),fanduct_shell*2+fanduct_h+z])
115 rotate([90,0,0]) { 115 rotate([90,0,0]) {
116 cylinder(r=fanduct_shell,h=fanduct_w,center=true,$fn=30); 116 cylinder(r=fanduct_shell,h=fanduct_w,center=true,$fn=30);
117 for(z=[-1,1]) translate([0,0,z*fanduct_w/2]) 117 for(z=[-1,1]) translate([0,0,z*fanduct_w/2])
118 sphere(r=fanduct_shell,$fn=30); 118 sphere(r=fanduct_shell,$fn=30);
119 } 119 }
120 } 120 }
121 } 121 }
122 122
123 // ***output 123 // ***output
124 module output(what,type=type) { 124 module output(what,type=type) {
125 module guideline(xyxy) { 125 module guideline(xyxy) {
126 module pin(xy) { 126 module pin(xy) {
127 translate([xy[0],xy[1],0]) 127 translate([xy[0],xy[1],0])
128 cylinder(d=2*extrusion_width,h=2*fanduct_shell+inlet_h,$fn=6); 128 cylinder(d=2*extrusion_width,h=2*fanduct_shell+inlet_h,$fn=6);
129 } 129 }
130 xyxyxy=concat(xyxy,[[0,0]]); 130 xyxyxy=concat(xyxy,[[0,0]]);
131 for(i=[0:1:len(xyxyxy)-2]) 131 for(i=[0:1:len(xyxyxy)-2])
132 hull() for(j=[i,i+1]) pin(xyxyxy[j]); 132 hull() for(j=[i,i+1]) pin(xyxyxy[j]);
133 } 133 }
134 134
135 module circus(what) { 135 module circus(what) {
136 if(what=="in") { 136 if(what=="in") {
137 difference() { 137 difference() {
138 rotate_extrude($fn=smooth_f) 138 rotate_extrude($fn=smooth_f)
139 polygon([ 139 polygon([
140 [0,-fanduct_elevation+fanduct_blowtarget+epsilon], 140 [0,-fanduct_elevation+fanduct_blowtarget+epsilon],
141 [fanduct_ir+fanduct_shell,fanduct_shell+fanduct_h/2], 141 [fanduct_ir+fanduct_shell,fanduct_shell+fanduct_h/2],
142 [fanduct_ir+fanduct_shell+fanduct_w/2,0], 142 [fanduct_ir+fanduct_shell+fanduct_w/2,0],
143 [0,-fanduct_elevation+fanduct_blowtarget-epsilon]]); 143 [0,-fanduct_elevation+fanduct_blowtarget-epsilon]]);
144 translate([0,0,-1]) 144 translate([0,0,-1])
145 cylinder(r=hotend_clearance,h=fanduct_h+2*fanduct_shell+2,$fn=smooth_f); 145 cylinder(r=hotend_clearance,h=fanduct_h+2*fanduct_shell+2,$fn=smooth_f);
146 mirror([0,0,1]) 146 mirror([0,0,1])
147 translate([0,0,-epsilon]) 147 translate([0,0,-epsilon])
148 cylinder(r=fanduct_ir+2*fanduct_shell+fanduct_w+1,h=fanduct_elevation+.1+2); 148 cylinder(r=fanduct_ir+2*fanduct_shell+fanduct_w+1,h=fanduct_elevation+.1+2);
149 } 149 }
150 }else if(what=="out") { 150 }else if(what=="out") {
151 rotate_extrude($fn=smooth_f) 151 rotate_extrude($fn=smooth_f)
152 polygon([ 152 polygon([
153 [0,-fanduct_elevation+fanduct_blowtarget+epsilon], 153 [0,-fanduct_elevation+fanduct_blowtarget+epsilon],
154 [fanduct_ir+fanduct_shell+1,fanduct_h/2], 154 [fanduct_ir+fanduct_shell+1,fanduct_h/2],
155 [fanduct_ir+fanduct_w/2+fanduct_shell+1,fanduct_shell], 155 [fanduct_ir+fanduct_w/2+fanduct_shell+1,fanduct_shell],
156 [0,-fanduct_elevation+fanduct_blowtarget-epsilon]]); 156 [0,-fanduct_elevation+fanduct_blowtarget-epsilon]]);
157 }else if(what=="airguides") { 157 }else if(what=="airguides") {
158 inr = fanduct_ir+fanduct_shell; our = inr+fanduct_w; 158 inr = fanduct_ir+fanduct_shell; our = inr+fanduct_w;
159 union() { 159 union() {
160 for(my=[0,1]) mirror([0,my,0]) { 160 for(my=[0,1]) mirror([0,my,0]) {
161 guideline([ 161 guideline([
162 [-our,inlet_w/6], 162 [-our,inlet_w/6],
163 [-inr*sin(60),inr*cos(60)] 163 [-inr*sin(60),inr*cos(60)]
164 ]); 164 ]);
165 a0=30; as=15; a1=180; 165 a0=30; as=15; a1=180;
166 for(a=[a0+as:as:a1]) { 166 for(a=[a0+as:as:a1]) {
167 f = as/(a1-a+as); 167 f = as/(a1-a+as);
168 rotate([0,0,a]) guideline([[-inr-fanduct_w*f,0]]); 168 rotate([0,0,a]) guideline([[-inr-fanduct_w*f,0]]);
169 } 169 }
170 guideline([ 170 guideline([
171 [-our+fanduct_w*cos(30)*3/4,fanduct_w*sin(30)*3/4], 171 [-our+fanduct_w*cos(30)*3/4,fanduct_w*sin(30)*3/4],
172 [-inr*cos(10),inr*sin(10)] 172 [-inr*cos(10),inr*sin(10)]
173 ]); 173 ]);
174 } 174 }
175 }/*union*/ 175 }/*union*/
176 }/*airguides*/ 176 }/*airguides*/
177 } 177 }
178 178
179 module jets(what) { 179 module jets(what) {
180 od = fanduct_h*2/3+fanduct_shell; 180 od = fanduct_h*2/3+fanduct_shell;
181 md = fanduct_ir+fanduct_shell+fanduct_w/2; 181 md = fanduct_ir+fanduct_shell+fanduct_w/2;
182 jww = 2*md*sin(jet_angle/2); 182 jww = 2*md*sin(jet_angle/2);
183 difference() { 183 difference() {
184 for(a=[0:120:359]) rotate([0,0,a]) { 184 for(a=[0:120:359]) rotate([0,0,a]) {
185 if(what=="in") { 185 if(what=="in") {
186 hull() { 186 hull() {
187 intersection() { 187 intersection() {
188 translate([md-fanduct_w/2,-jww/2,0]) 188 translate([md-fanduct_w/2,-jww/2,0])
189 cube(size=[fanduct_shell+fanduct_w/2,jww,od]); 189 cube(size=[fanduct_shell+fanduct_w/2,jww,od]);
190 duct(what=what); 190 duct(what=what);
191 } 191 }
192 translate([0,0,-fanduct_elevation]) sphere(r=.5); 192 translate([0,0,-fanduct_elevation]) sphere(r=.5);
193 } 193 }
194 }else if(what=="out") { 194 }else if(what=="out") {
195 hull() { 195 hull() {
196 intersection() { 196 intersection() {
197 translate([md-fanduct_w/2,-jww/2+fanduct_shell,fanduct_shell]) 197 translate([md-fanduct_w/2,-jww/2+fanduct_shell,fanduct_shell])
198 cube(size=[fanduct_w/2,jww-2*fanduct_shell,od-2*fanduct_shell]); 198 cube(size=[fanduct_w/2,jww-2*fanduct_shell,od-2*fanduct_shell]);
199 duct(what=what); 199 duct(what=what);
200 } 200 }
201 translate([0,0,-fanduct_elevation]) sphere(r=.2); 201 translate([0,0,-fanduct_elevation]) sphere(r=.2);
202 } 202 }
203 } 203 }
204 } 204 }
205 if(what=="in") { 205 if(what=="in") {
206 translate([0,0,-fanduct_elevation-2+epsilon]) 206 translate([0,0,-fanduct_elevation-2+epsilon])
207 cylinder(r=fanduct_ir+fanduct_shell*2+fanduct_w+1,h=fanduct_elevation+2); 207 cylinder(r=fanduct_ir+fanduct_shell*2+fanduct_w+1,h=fanduct_elevation+2);
208 translate([0,0,-hotend_clearance]) 208 translate([0,0,-hotend_clearance])
209 rotate([0,0,30]) 209 rotate([0,0,30])
210 cylinder(r1=hotend_clearance*2,r2=0,h=hotend_clearance*2,$fn=6); 210 cylinder(r1=hotend_clearance*2,r2=0,h=hotend_clearance*2,$fn=6);
211 } 211 }
212 } 212 }
213 } 213 }
214 214
215 if(type=="circular") circus(what); 215 module dual(what=what) {
216 module hulls(spots=dual_spots) {
217 for(my=[0,1]) mirror([0,my,0]) for(pn=[0:1:len(spots)-2]) hull() {
218 for(p=[spots[pn],spots[pn+1]]) translate(p) children(0);
219 children([1:$children-1]);
220 }
221 }
222 if(what=="in") {
223 difference() {
224 hulls() {
225 cylinder(d=fanduct_w+2*fanduct_shell,h=2*fanduct_shell+fanduct_h/2);
226 translate([0,-nozzles_apart/2,-fanduct_elevation-fanduct_blowtarget]) sphere(d=.1);
227 }
228 translate([0,0,epsilon]) hull() for(my=[0:1]) mirror([0,my,0]) for(s=dual_spots) translate(s)
229 mirror([0,0,1]) cylinder(d=fanduct_w+2*fanduct_shell+2,h=fanduct_elevation-fanduct_blowtarget+1);
230 for(s=[-1,1]) translate([0,s*nozzles_apart/2,-1])
231 cylinder(r=hotend_clearance,h=fanduct_h+2*fanduct_shell+2,$fn=smooth_f);
232 }
233 }else if(what=="out") {
234 hulls() {
235 translate([0,0,fanduct_shell]) cylinder(d=fanduct_w,h=fanduct_h/2-fanduct_shell/2);
236 translate([0,-nozzles_apart/2,-fanduct_elevation+fanduct_blowtarget]) sphere(d=.1);
237 }
238 }
239 }
240
241 if(dual) dual(what);
242 else if(type=="circular") circus(what);
216 else if(type=="3jets") jets(what); 243 else if(type=="3jets") jets(what);
217 } 244 }
218 245
219 // ***air intake 246 // ***air intake
220 module intake(what) { 247 module intake(what) {
221 module placeit() { 248 module placeit() {
222 translate([-fanduct_ir-2*fanduct_shell-fanduct_w-inlet_away,0,fanduct_shell]) 249 translate([-fanduct_ir-2*fanduct_shell-fanduct_w-inlet_away,0,fanduct_shell])
223 rotate([0,-90,0]) 250 rotate([0,-90,0])
224 children(); 251 children();
225 } 252 }
226 if(what=="in") { 253 if(what=="in") {
227 placeit() translate([0,-inlet_w/2,0]) { 254 placeit() translate([0,-inlet_w/2,0]) {
228 difference() { 255 difference() {
229 cube(size=[inlet_h,inlet_w,inlet_long_l+fanduct_shell]); 256 cube(size=[inlet_h,inlet_w,inlet_long_l+fanduct_shell]);
230 translate([inlet_h+fanduct_shell,0,inlet_long_l+fanduct_shell]) 257 translate([inlet_h+fanduct_shell,0,inlet_long_l+fanduct_shell])
231 rotate([-90,0,0]) 258 rotate([-90,0,0])
232 translate([0,0,-1]) 259 translate([0,0,-1])
233 cylinder(r=inlet_h,h=inlet_w+2*fanduct_shell+2,$fn=inlet_h*4); 260 cylinder(r=inlet_h,h=inlet_w+2*fanduct_shell+2,$fn=inlet_h*4);
234 } 261 }
235 // supports 262 // supports
236 for(i=[-1,0,1]) 263 for(i=[-1,0,1])
237 translate([-fanduct_shell, 264 translate([-fanduct_shell,
238 (i+1)*(inlet_w-extrusion_width)/2, 265 (i+1)*(inlet_w-extrusion_width)/2,
239 -inlet_away-fanduct_w/2]) 266 -inlet_away-fanduct_w/2])
240 cube(size=[fanduct_shell, 267 cube(size=[fanduct_shell,
241 extrusion_width, 268 extrusion_width,
242 inlet_long_l+fanduct_shell+inlet_away+fanduct_w/2]); 269 inlet_long_l+fanduct_shell+inlet_away+fanduct_w/2]);
243 } 270 }
244 hull() { 271 hull() {
245 placeit() translate([-fanduct_shell,-inlet_w/2-fanduct_shell,0]) 272 placeit() translate([-fanduct_shell,-inlet_w/2-fanduct_shell,0])
246 cube(size=[inlet_h+2*fanduct_shell,inlet_w+2*fanduct_shell,fanduct_shell]); 273 cube(size=[inlet_h+2*fanduct_shell,inlet_w+2*fanduct_shell,fanduct_shell]);
247 translate([-fanduct_ir-fanduct_shell-fanduct_w/2,0,0]) 274 translate([-fanduct_ir-fanduct_shell-fanduct_w/2,0,0])
248 translate([0,-inlet_w/2-fanduct_shell/2,0]) 275 translate([0,-inlet_w/2-fanduct_shell/2,0])
249 cube(size=[1,inlet_w+fanduct_shell,fanduct_shell*2+fanduct_h]); 276 cube(size=[1,inlet_w+fanduct_shell,fanduct_shell*2+fanduct_h]);
250 } 277 }
251 }else if(what=="out") { 278 }else if(what=="out") {
252 placeit() translate([fanduct_shell,-inlet_w/2+fanduct_shell,0]) 279 placeit() translate([fanduct_shell,-inlet_w/2+fanduct_shell,0])
253 cube(size=[inlet_h-2*fanduct_shell,inlet_w-2*fanduct_shell,inlet_long_l+fanduct_shell+1]); 280 cube(size=[inlet_h-2*fanduct_shell,inlet_w-2*fanduct_shell,inlet_long_l+fanduct_shell+1]);
254 hull() { 281 hull() {
255 placeit() translate([fanduct_shell,-inlet_w/2+fanduct_shell,0]) 282 placeit() translate([fanduct_shell,-inlet_w/2+fanduct_shell,0])
256 cube(size=[inlet_h-2*fanduct_shell,inlet_w-2*fanduct_shell,fanduct_shell]); 283 cube(size=[inlet_h-2*fanduct_shell,inlet_w-2*fanduct_shell,fanduct_shell]);
257 translate([-fanduct_ir-fanduct_shell-fanduct_w/2,0,fanduct_shell]) 284 translate([-fanduct_ir-fanduct_shell-fanduct_w/2,0,fanduct_shell])
258 translate([0,-inlet_w/2+fanduct_shell,0]) 285 translate([0,-inlet_w/2+fanduct_shell,0])
259 cube(size=[1,inlet_w-2*fanduct_shell,fanduct_h]); 286 cube(size=[1,inlet_w-2*fanduct_shell,fanduct_h]);
260 } 287 }
261 } 288 }
262 } 289 }
263 290
264 // ***DUCT TAILS!!! WOO-OO! (every day they're out there making duct tails…) 291 // ***DUCT TAILS!!! WOO-OO! (every day they're out there making duct tails…)
265 module tails(what) { 292 module tails(what) {
266 if(what=="in") { 293 if(what=="in") {
267 for(mx=[0,1]) mirror([mx,0,0]) 294 for(mx=[0,1]) mirror([mx,0,0])
268 translate([fanduct_ir+fanduct_shell+fanduct_w/2,0,fanduct_shell+fanduct_h/2]) 295 translate([fanduct_ir+fanduct_shell+fanduct_w/2,0,fanduct_shell+fanduct_h/2])
269 rotate([90,0,90]) 296 rotate([90,0,90])
270 translate([0,0,-snapper_d/2]) 297 translate([0,0,-snapper_d/2])
271 snapper(d=snapper_d,o=snapper_overlap,side=0,l=fanduct_h*3/2+fanduct_shell); 298 snapper(d=snapper_d,o=snapper_overlap,side=0,l=fanduct_h*3/2+fanduct_shell);
272 } 299 }
273 } 300 }
274 301
275 module parts(what) { 302 module parts(what) {
276 union() { 303 union() {
277 duct(what); 304 duct(what);
278 marks(what); 305 marks(what);
279 output(what); 306 output(what);
280 intake(what); 307 intake(what);
281 tails(what); 308 tails(what);
282 } 309 }
283 } 310 }
284 311
285 difference() { 312 difference() {
286 parts("in"); 313 parts("in");
287 parts("out"); 314 parts("out");
288 } 315 }
289 intersection() { 316 intersection() {
290 union() { 317 union() {
291 output("airguides"); 318 output("airguides");
292 sphere(d=epsilon); 319 sphere(d=epsilon);
293 } 320 }
294 union() { 321 union() {
295 duct("in"); output("in"); intake("in"); 322 duct("in"); output("in"); intake("in");
296 } 323 }
297 } 324 }
298} 325}
299 326
300view="*"; // hcut|vcut|* 327view="*"; // hcut|vcut|*
301 328
302hinfinity=4*(fanduct_ir+fanduct_shell*2+fanduct_w+inlet_away); 329hinfinity=4*(fanduct_ir+fanduct_shell*2+fanduct_w+inlet_away);
303vinfinity=2*(fanduct_shell*2+fanduct_h+inlet_h); 330vinfinity=2*(fanduct_shell*2+fanduct_h+inlet_h);
304if(view=="hcut") { 331if(view=="hcut") {
305 difference() { 332 difference() {
306 fanduct(); 333 fanduct();
307 translate([-hinfinity/2,-hinfinity/2,fanduct_shell+fanduct_h/2]) 334 translate([-hinfinity/2,-hinfinity/2,fanduct_shell+fanduct_h/2])
308 cube(size=[hinfinity,hinfinity,vinfinity]); 335 cube(size=[hinfinity,hinfinity,vinfinity]);
309 } 336 }
310}else if(view=="vcut") { 337}else if(view=="vcut") {
311 difference() { 338 difference() {
312 fanduct(); 339 fanduct();
313 translate([-hinfinity/2,0,-vinfinity/2]) 340 translate([-hinfinity/2,0,-vinfinity/2])
314 cube(size=[hinfinity,hinfinity,vinfinity]); 341 cube(size=[hinfinity,hinfinity,vinfinity]);
315 } 342 }
316}else fanduct(); 343}else fanduct();
317/* vim:set sw=1 ai: */ 344/* vim:set sw=1 ai: */