author | Michael Krelin <hacker@klever.net> | 2016-07-22 15:58:12 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2016-07-22 15:58:12 (UTC) |
commit | b111117f933cfa683a2d19bb1962a566f2a49f8f (patch) (unidiff) | |
tree | b74000656232716110fa03519129350cff7e9adc /fanduct.scad | |
parent | 57ffe20dcc5e5c0077272e8a0a3bb093d4da001d (diff) | |
download | fanductory-b111117f933cfa683a2d19bb1962a566f2a49f8f.zip fanductory-b111117f933cfa683a2d19bb1962a566f2a49f8f.tar.gz fanductory-b111117f933cfa683a2d19bb1962a566f2a49f8f.tar.bz2 |
-rw-r--r-- | fanduct.scad | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fanduct.scad b/fanduct.scad index efc6a19..b1c9bd8 100644 --- a/fanduct.scad +++ b/fanduct.scad | |||
@@ -229,259 +229,261 @@ module fanduct(type=type,ductshape=ductshape,dual=dual) { | |||
229 | }else if(what=="airguides") { | 229 | }else if(what=="airguides") { |
230 | inr = fanduct_ir+fanduct_shell; our = inr+fanduct_w; | 230 | inr = fanduct_ir+fanduct_shell; our = inr+fanduct_w; |
231 | union() { | 231 | union() { |
232 | for(my=[0,1]) mirror([0,my,0]) { | 232 | for(my=[0,1]) mirror([0,my,0]) { |
233 | guideline([ | 233 | guideline([ |
234 | [-our,inlet_w/6], | 234 | [-our,inlet_w/6], |
235 | [-inr*sin(60),inr*cos(60)] | 235 | [-inr*sin(60),inr*cos(60)] |
236 | ]); | 236 | ]); |
237 | a0=30; as=15; a1=180; | 237 | a0=30; as=15; a1=180; |
238 | for(a=[a0+as:as:a1]) { | 238 | for(a=[a0+as:as:a1]) { |
239 | f = as/(a1-a+as); | 239 | f = as/(a1-a+as); |
240 | rotate([0,0,a]) guideline([[-inr-fanduct_w*f,0]]); | 240 | rotate([0,0,a]) guideline([[-inr-fanduct_w*f,0]]); |
241 | } | 241 | } |
242 | guideline([ | 242 | guideline([ |
243 | [-our+fanduct_w*cos(30)*3/4,fanduct_w*sin(30)*3/4], | 243 | [-our+fanduct_w*cos(30)*3/4,fanduct_w*sin(30)*3/4], |
244 | [-inr*cos(10),inr*sin(10)] | 244 | [-inr*cos(10),inr*sin(10)] |
245 | ]); | 245 | ]); |
246 | } | 246 | } |
247 | }/*union*/ | 247 | }/*union*/ |
248 | }/*airguides*/ | 248 | }/*airguides*/ |
249 | } | 249 | } |
250 | 250 | ||
251 | module jets(what) { | 251 | module jets(what) { |
252 | od = fanduct_h*2/3+fanduct_shell; | 252 | od = fanduct_h*2/3+fanduct_shell; |
253 | md = fanduct_ir+fanduct_shell+fanduct_w/2; | 253 | md = fanduct_ir+fanduct_shell+fanduct_w/2; |
254 | jww = 2*md*sin(jet_angle/2); | 254 | jww = 2*md*sin(jet_angle/2); |
255 | difference() { | 255 | difference() { |
256 | for(a=[0:120:359]) rotate([0,0,a]) { | 256 | for(a=[0:120:359]) rotate([0,0,a]) { |
257 | if(what=="in") { | 257 | if(what=="in") { |
258 | hull() { | 258 | hull() { |
259 | intersection() { | 259 | intersection() { |
260 | translate([md-fanduct_w/2,-jww/2,0]) | 260 | translate([md-fanduct_w/2,-jww/2,0]) |
261 | cube(size=[fanduct_shell+fanduct_w/2,jww,od]); | 261 | cube(size=[fanduct_shell+fanduct_w/2,jww,od]); |
262 | duct(what=what); | 262 | duct(what=what); |
263 | } | 263 | } |
264 | translate([0,0,-fanduct_elevation]) sphere(r=.5); | 264 | translate([0,0,-fanduct_elevation]) sphere(r=.5); |
265 | } | 265 | } |
266 | }else if(what=="out") { | 266 | }else if(what=="out") { |
267 | hull() { | 267 | hull() { |
268 | intersection() { | 268 | intersection() { |
269 | translate([md-fanduct_w/2,-jww/2+fanduct_shell,fanduct_shell]) | 269 | translate([md-fanduct_w/2,-jww/2+fanduct_shell,fanduct_shell]) |
270 | cube(size=[fanduct_w/2,jww-2*fanduct_shell,od-2*fanduct_shell]); | 270 | cube(size=[fanduct_w/2,jww-2*fanduct_shell,od-2*fanduct_shell]); |
271 | duct(what=what); | 271 | duct(what=what); |
272 | } | 272 | } |
273 | translate([0,0,-fanduct_elevation]) sphere(r=.2); | 273 | translate([0,0,-fanduct_elevation]) sphere(r=.2); |
274 | } | 274 | } |
275 | } | 275 | } |
276 | } | 276 | } |
277 | if(what=="in") { | 277 | if(what=="in") { |
278 | translate([0,0,-fanduct_elevation-2+epsilon]) | 278 | translate([0,0,-fanduct_elevation-2+epsilon]) |
279 | cylinder(r=fanduct_ir+fanduct_shell*2+fanduct_w+1,h=fanduct_elevation+2); | 279 | cylinder(r=fanduct_ir+fanduct_shell*2+fanduct_w+1,h=fanduct_elevation+2); |
280 | translate([0,0,-hotend_clearance]) | 280 | translate([0,0,-hotend_clearance]) |
281 | rotate([0,0,30]) | 281 | rotate([0,0,30]) |
282 | cylinder(r1=hotend_clearance*2,r2=0,h=hotend_clearance*2,$fn=6); | 282 | cylinder(r1=hotend_clearance*2,r2=0,h=hotend_clearance*2,$fn=6); |
283 | } | 283 | } |
284 | } | 284 | } |
285 | } | 285 | } |
286 | 286 | ||
287 | module dual(what=what) { | 287 | module dual(what=what) { |
288 | module hulls(spots=dual_spots) { | 288 | module hulls(spots=dual_spots) { |
289 | for(my=[0,1]) mirror([0,my,0]) for(pn=[0:1:len(spots)-2]) hull() { | 289 | for(my=[0,1]) mirror([0,my,0]) for(pn=[0:1:len(spots)-2]) hull() { |
290 | for(p=[spots[pn],spots[pn+1]]) translate(p) children(0); | 290 | for(p=[spots[pn],spots[pn+1]]) translate(p) children(0); |
291 | children([1:$children-1]); | 291 | children([1:$children-1]); |
292 | } | 292 | } |
293 | } | 293 | } |
294 | if(what=="in") { | 294 | if(what=="in") { |
295 | cfn= 4; // clearance cutout $fn | 295 | cfn= 4; // clearance cutout $fn |
296 | difference() { | 296 | difference() { |
297 | hulls() { | 297 | hulls() { |
298 | cylinder(d=fanduct_w+2*fanduct_shell,h=2*fanduct_shell+fanduct_h/2); | 298 | cylinder(d=fanduct_w+2*fanduct_shell,h=2*fanduct_shell+fanduct_h/2); |
299 | translate([0,-nozzles_apart/2,-fanduct_elevation-fanduct_blowtarget]) sphere(d=.1); | 299 | translate([0,-nozzles_apart/2,-fanduct_elevation-fanduct_blowtarget]) sphere(d=.1); |
300 | } | 300 | } |
301 | translate([0,0,epsilon]) hull() for(my=[0:1]) mirror([0,my,0]) for(s=dual_spots) translate(s) | 301 | translate([0,0,epsilon]) hull() for(my=[0:1]) mirror([0,my,0]) for(s=dual_spots) translate(s) |
302 | mirror([0,0,1]) cylinder(d=fanduct_w+2*fanduct_shell+2,h=fanduct_elevation-fanduct_blowtarget+1); | 302 | mirror([0,0,1]) cylinder(d=fanduct_w+2*fanduct_shell+2,h=fanduct_elevation-fanduct_blowtarget+1); |
303 | for(s=[-1,1]) translate([0,s*nozzles_apart/2,-1]) | 303 | for(s=[-1,1]) translate([0,s*nozzles_apart/2,-1]) |
304 | rotate([0,0,180/cfn]) cylinder(r=hotend_clearance/cos(180/cfn),h=fanduct_h+2*fanduct_shell+2,$fn=cfn); | 304 | rotate([0,0,180/cfn]) cylinder(r=hotend_clearance/cos(180/cfn),h=fanduct_h+2*fanduct_shell+2,$fn=cfn); |
305 | } | 305 | } |
306 | }else if(what=="out") { | 306 | }else if(what=="out") { |
307 | hulls() { | 307 | hulls() { |
308 | translate([0,0,fanduct_shell]) cylinder(d=fanduct_w,h=fanduct_h/2-fanduct_shell/2); | 308 | translate([0,0,fanduct_shell]) cylinder(d=fanduct_w,h=fanduct_h/2-fanduct_shell/2); |
309 | translate([0,-nozzles_apart/2,-fanduct_elevation+fanduct_blowtarget]) sphere(d=.1); | 309 | translate([0,-nozzles_apart/2,-fanduct_elevation+fanduct_blowtarget]) sphere(d=.1); |
310 | } | 310 | } |
311 | }else if(what=="airguides") { | 311 | }else if(what=="airguides") { |
312 | far = fanduct_ir+fanduct_shell+fanduct_w; | 312 | far = fanduct_ir+fanduct_shell+fanduct_w; |
313 | near = fanduct_ir; | 313 | near = fanduct_ir; |
314 | union() { | 314 | union() { |
315 | for(my=[0,1]) mirror([0,my,0]) { | 315 | for(my=[0,1]) mirror([0,my,0]) { |
316 | guideline([ [-far ,0], [0, nozzles_apart/8] ]); | 316 | guideline([ [-far ,0], [0, nozzles_apart/8] ]); |
317 | guideline([ [-far ,inlet_w/2/4 ], | 317 | guideline([ [-far ,inlet_w/2/4 ], |
318 | [-near ,to_midduct/2] ]); | 318 | [-near ,to_midduct/2] ]); |
319 | guideline([ [-near-fanduct_w/3, to_midduct/2 ], | 319 | guideline([ [-near-fanduct_w/3, to_midduct/2 ], |
320 | [-near ,nozzles_apart/2+near ] ]); | 320 | [-near ,nozzles_apart/2+near ] ]); |
321 | guideline([ [0 ,nozzles_apart/2+near+fanduct_w*space_behind_nozzle/to_midduct] ]); | 321 | guideline([ [0 ,nozzles_apart/2+near+fanduct_w*space_behind_nozzle/to_midduct] ]); |
322 | } | 322 | } |
323 | } | 323 | } |
324 | } | 324 | } |
325 | } | 325 | } |
326 | 326 | ||
327 | module dual_jets(what=what) { | 327 | module dual_jets(what=what) { |
328 | od=fanduct_h*2/3+fanduct_shell; | 328 | od=fanduct_h*2/3+fanduct_shell; |
329 | md=fanduct_ir+fanduct_shell+fanduct_w/2; | 329 | md=fanduct_ir+fanduct_shell+fanduct_w/2; |
330 | jww = 2*md*sin(jet_angle/2); | 330 | jww = 2*md*sin(jet_angle/2); |
331 | difference() { | 331 | difference() { |
332 | for(my=[0,1]) mirror([0,my,0]) | 332 | for(my=[0,1]) mirror([0,my,0]) |
333 | translate([0,nozzles_apart/2,0]) | 333 | translate([0,nozzles_apart/2,0]) |
334 | for(a=[45,135]) rotate([0,0,a]) | 334 | for(a=[45,135]) rotate([0,0,a]) |
335 | if(what=="in") { | 335 | if(what=="in") { |
336 | hull() { | 336 | hull() { |
337 | intersection() { | 337 | intersection() { |
338 | translate([md-fanduct_w/2,-jww/2,0]) | 338 | translate([md-fanduct_w/2,-jww/2,0]) |
339 | cube(size=[fanduct_shell+fanduct_w/2,jww,od]); | 339 | cube(size=[fanduct_shell+fanduct_w/2,jww,od]); |
340 | rotate([0,0,-a]) translate([0,-nozzles_apart/2,0]) duct(what=what); | 340 | rotate([0,0,-a]) translate([0,-nozzles_apart/2,0]) duct(what=what); |
341 | } // intersection | 341 | } // intersection |
342 | translate([0,0,-fanduct_elevation]) sphere(r=.5); | 342 | translate([0,0,-fanduct_elevation]) sphere(r=.5); |
343 | } // hull | 343 | } // hull |
344 | }else if(what=="out") { | 344 | }else if(what=="out") { |
345 | hull() { | 345 | hull() { |
346 | intersection() { | 346 | intersection() { |
347 | translate([md-fanduct_w/2,-jww/2+fanduct_shell,fanduct_shell]) | 347 | translate([md-fanduct_w/2,-jww/2+fanduct_shell,fanduct_shell]) |
348 | cube(size=[fanduct_w/2,jww-2*fanduct_shell,od-2*fanduct_shell]); | 348 | cube(size=[fanduct_w/2,jww-2*fanduct_shell,od-2*fanduct_shell]); |
349 | rotate([0,0,-a]) translate([0,-nozzles_apart/2,0]) duct(what=what); | 349 | rotate([0,0,-a]) translate([0,-nozzles_apart/2,0]) duct(what=what); |
350 | } // intersection | 350 | } // intersection |
351 | translate([0,0,-fanduct_elevation]) sphere(r=.5); | 351 | translate([0,0,-fanduct_elevation]) sphere(r=.5); |
352 | } // hull | 352 | } // hull |
353 | } // what=="out" | 353 | } // what=="out" |
354 | if(what=="in") { | 354 | if(what=="in") { |
355 | translate([0,0,-fanduct_elevation/2-1+epsilon]) | 355 | translate([0,0,-fanduct_elevation/2-1+epsilon]) |
356 | cube(size=[2*(fanduct_ir+2*fanduct_shell+fanduct_w+1),nozzles_apart+2*(fanduct_ir+2*fanduct_shell+fanduct_w+1),fanduct_elevation+2],center=true); | 356 | cube(size=[2*(fanduct_ir+2*fanduct_shell+fanduct_w+1),nozzles_apart+2*(fanduct_ir+2*fanduct_shell+fanduct_w+1),fanduct_elevation+2],center=true); |
357 | cfn=4; | ||
358 | hc = hotend_clearance/cos(180/cfn); | ||
357 | for(my=[0,1]) mirror([0,my,0]) | 359 | for(my=[0,1]) mirror([0,my,0]) |
358 | translate([0,nozzles_apart/2,-hotend_clearance]) | 360 | translate([0,nozzles_apart/2,-hc]) |
359 | cylinder(r1=hotend_clearance*2,r2=0,h=hotend_clearance*2,$fn=4); | 361 | cylinder(r1=hc*2,r2=0,h=hc*2,$fn=cfn); |
360 | } | 362 | } |
361 | } // difference | 363 | } // difference |
362 | } | 364 | } |
363 | 365 | ||
364 | module dual_simple(what=what) { | 366 | module dual_simple(what=what) { |
365 | for(my=[0:1]) mirror([0,my,0]) if(what=="in") { | 367 | for(my=[0:1]) mirror([0,my,0]) if(what=="in") { |
366 | difference() { | 368 | difference() { |
367 | hull() { | 369 | hull() { |
368 | translate([0,nozzles_apart/2+fanduct_ir+fanduct_shell+fanduct_w/2,0]) | 370 | translate([0,nozzles_apart/2+fanduct_ir+fanduct_shell+fanduct_w/2,0]) |
369 | cylinder(d=fanduct_w+2*fanduct_shell,h=fanduct_h*2/3+2*fanduct_shell); | 371 | cylinder(d=fanduct_w+2*fanduct_shell,h=fanduct_h*2/3+2*fanduct_shell); |
370 | translate([0,nozzles_apart/2,-fanduct_elevation+fanduct_blowtarget]) | 372 | translate([0,nozzles_apart/2,-fanduct_elevation+fanduct_blowtarget]) |
371 | rotate([0,90,0]) cylinder(r=.5,h=fanduct_w*2,center=true); | 373 | rotate([0,90,0]) cylinder(r=.5,h=fanduct_w*2,center=true); |
372 | } | 374 | } |
373 | rr = 2*(fanduct_ir+fanduct_shell*2+fanduct_w+2); | 375 | rr = 2*(fanduct_ir+fanduct_shell*2+fanduct_w+2); |
374 | translate([-rr/2,0,0]) mirror([0,0,1]) cube(size=[rr,rr,rr]); | 376 | translate([-rr/2,0,0]) mirror([0,0,1]) cube(size=[rr,rr,rr]); |
375 | } | 377 | } |
376 | }else if(what=="out") { | 378 | }else if(what=="out") { |
377 | hull() { | 379 | hull() { |
378 | translate([0,nozzles_apart/2+fanduct_ir+fanduct_shell+fanduct_w/2,fanduct_shell]) | 380 | translate([0,nozzles_apart/2+fanduct_ir+fanduct_shell+fanduct_w/2,fanduct_shell]) |
379 | cylinder(d=fanduct_w,h=fanduct_h*2/3); | 381 | cylinder(d=fanduct_w,h=fanduct_h*2/3); |
380 | translate([0,nozzles_apart/2,-fanduct_elevation+fanduct_blowtarget]) | 382 | translate([0,nozzles_apart/2,-fanduct_elevation+fanduct_blowtarget]) |
381 | rotate([0,90,0]) cylinder(d=.5,h=fanduct_w*2,center=true); | 383 | rotate([0,90,0]) cylinder(d=.5,h=fanduct_w*2,center=true); |
382 | } | 384 | } |
383 | } | 385 | } |
384 | } | 386 | } |
385 | 387 | ||
386 | if(dual) { | 388 | if(dual) { |
387 | if(type=="simple") dual_simple(what); | 389 | if(type=="simple") dual_simple(what); |
388 | else if(type=="jets") dual_jets(what); | 390 | else if(type=="jets") dual_jets(what); |
389 | else dual(what); | 391 | else dual(what); |
390 | }else if(type=="circular") circus(what); | 392 | }else if(type=="circular") circus(what); |
391 | else if(type=="jets") jets(what); | 393 | else if(type=="jets") jets(what); |
392 | } | 394 | } |
393 | 395 | ||
394 | // ***air intake | 396 | // ***air intake |
395 | module intake(what) { | 397 | module intake(what) { |
396 | module placeit() { | 398 | module placeit() { |
397 | translate([-fanduct_ir-2*fanduct_shell-fanduct_w-inlet_away,0,fanduct_shell]) | 399 | translate([-fanduct_ir-2*fanduct_shell-fanduct_w-inlet_away,0,fanduct_shell]) |
398 | rotate([0,-90,0]) | 400 | rotate([0,-90,0]) |
399 | children(); | 401 | children(); |
400 | } | 402 | } |
401 | if(what=="in") { | 403 | if(what=="in") { |
402 | placeit() translate([0,-inlet_w/2,0]) { | 404 | placeit() translate([0,-inlet_w/2,0]) { |
403 | difference() { | 405 | difference() { |
404 | cube(size=[inlet_h,inlet_w,inlet_long_l+fanduct_shell]); translate([inlet_h+fanduct_shell,0,inlet_long_l+fanduct_shell]) | 406 | cube(size=[inlet_h,inlet_w,inlet_long_l+fanduct_shell]); translate([inlet_h+fanduct_shell,0,inlet_long_l+fanduct_shell]) |
405 | rotate([-90,0,0]) | 407 | rotate([-90,0,0]) |
406 | translate([0,0,-1]) | 408 | translate([0,0,-1]) |
407 | cylinder(r=inlet_h,h=inlet_w+2*fanduct_shell+2,$fn=inlet_h*4); | 409 | cylinder(r=inlet_h,h=inlet_w+2*fanduct_shell+2,$fn=inlet_h*4); |
408 | } | 410 | } |
409 | // supports | 411 | // supports |
410 | for(i=[-1,0,1]) | 412 | for(i=[-1,0,1]) |
411 | translate([-fanduct_shell, | 413 | translate([-fanduct_shell, |
412 | (i+1)*(inlet_w-extrusion_width)/2, | 414 | (i+1)*(inlet_w-extrusion_width)/2, |
413 | -inlet_away-fanduct_w/2]) | 415 | -inlet_away-fanduct_w/2]) |
414 | cube(size=[fanduct_shell+1, | 416 | cube(size=[fanduct_shell+1, |
415 | extrusion_width, | 417 | extrusion_width, |
416 | inlet_long_l+fanduct_shell+inlet_away+fanduct_w/2]); | 418 | inlet_long_l+fanduct_shell+inlet_away+fanduct_w/2]); |
417 | } | 419 | } |
418 | hull() { | 420 | hull() { |
419 | placeit() translate([-fanduct_shell,-inlet_w/2-fanduct_shell,0]) | 421 | placeit() translate([-fanduct_shell,-inlet_w/2-fanduct_shell,0]) |
420 | cube(size=[inlet_h+2*fanduct_shell,inlet_w+2*fanduct_shell,fanduct_shell]); | 422 | cube(size=[inlet_h+2*fanduct_shell,inlet_w+2*fanduct_shell,fanduct_shell]); |
421 | translate([-fanduct_ir-fanduct_shell-fanduct_w/2,0,0]) | 423 | translate([-fanduct_ir-fanduct_shell-fanduct_w/2,0,0]) |
422 | translate([0,-inlet_w/2-fanduct_shell/2,0]) | 424 | translate([0,-inlet_w/2-fanduct_shell/2,0]) |
423 | cube(size=[1,inlet_w+fanduct_shell,fanduct_shell*2+fanduct_h]); | 425 | cube(size=[1,inlet_w+fanduct_shell,fanduct_shell*2+fanduct_h]); |
424 | } | 426 | } |
425 | }else if(what=="out") { | 427 | }else if(what=="out") { |
426 | placeit() translate([fanduct_shell,-inlet_w/2+fanduct_shell,0]) | 428 | placeit() translate([fanduct_shell,-inlet_w/2+fanduct_shell,0]) |
427 | cube(size=[inlet_h-2*fanduct_shell,inlet_w-2*fanduct_shell,inlet_long_l+fanduct_shell+1]); | 429 | cube(size=[inlet_h-2*fanduct_shell,inlet_w-2*fanduct_shell,inlet_long_l+fanduct_shell+1]); |
428 | hull() { | 430 | hull() { |
429 | placeit() translate([fanduct_shell,-inlet_w/2+fanduct_shell,0]) | 431 | placeit() translate([fanduct_shell,-inlet_w/2+fanduct_shell,0]) |
430 | cube(size=[inlet_h-2*fanduct_shell,inlet_w-2*fanduct_shell,fanduct_shell]); | 432 | cube(size=[inlet_h-2*fanduct_shell,inlet_w-2*fanduct_shell,fanduct_shell]); |
431 | translate([-fanduct_ir-fanduct_shell-fanduct_w/2,0,fanduct_shell]) | 433 | translate([-fanduct_ir-fanduct_shell-fanduct_w/2,0,fanduct_shell]) |
432 | translate([0,-inlet_w/2+fanduct_shell,0]) | 434 | translate([0,-inlet_w/2+fanduct_shell,0]) |
433 | cube(size=[1,inlet_w-2*fanduct_shell,fanduct_h]); | 435 | cube(size=[1,inlet_w-2*fanduct_shell,fanduct_h]); |
434 | } | 436 | } |
435 | } | 437 | } |
436 | } | 438 | } |
437 | 439 | ||
438 | // ***DUCT TAILS!!! WOO-OO! (every day they're out there making duct tails…) | 440 | // ***DUCT TAILS!!! WOO-OO! (every day they're out there making duct tails…) |
439 | module tails(what) { | 441 | module tails(what) { |
440 | if(dual && type=="simple") { | 442 | if(dual && type=="simple") { |
441 | // XXX: not sure if it will ever be | 443 | // XXX: not sure if it will ever be |
442 | }else{ | 444 | }else{ |
443 | if(what=="in") { | 445 | if(what=="in") { |
444 | for(mx=[0,1]) mirror([mx,0,0]) | 446 | for(mx=[0,1]) mirror([mx,0,0]) |
445 | translate([fanduct_ir+fanduct_shell+fanduct_w/2,0,fanduct_shell+fanduct_h/2]) | 447 | translate([fanduct_ir+fanduct_shell+fanduct_w/2,0,fanduct_shell+fanduct_h/2]) |
446 | rotate([90,0,90]) | 448 | rotate([90,0,90]) |
447 | translate([0,0,-snapper_d/2]) | 449 | translate([0,0,-snapper_d/2]) |
448 | snapper(d=snapper_d,o=snapper_overlap,side=0,l=fanduct_h*3/2+fanduct_shell); | 450 | snapper(d=snapper_d,o=snapper_overlap,side=0,l=fanduct_h*3/2+fanduct_shell); |
449 | } | 451 | } |
450 | } | 452 | } |
451 | } | 453 | } |
452 | 454 | ||
453 | module parts(what) { | 455 | module parts(what) { |
454 | union() { | 456 | union() { |
455 | duct(what); | 457 | duct(what); |
456 | marks(what); | 458 | marks(what); |
457 | output(what); | 459 | output(what); |
458 | intake(what); | 460 | intake(what); |
459 | tails(what); | 461 | tails(what); |
460 | } | 462 | } |
461 | } | 463 | } |
462 | 464 | ||
463 | difference() { | 465 | difference() { |
464 | parts("in"); | 466 | parts("in"); |
465 | parts("out"); | 467 | parts("out"); |
466 | } | 468 | } |
467 | intersection() { | 469 | intersection() { |
468 | union() { | 470 | union() { |
469 | output("airguides"); | 471 | output("airguides"); |
470 | sphere(d=epsilon); | 472 | sphere(d=epsilon); |
471 | } | 473 | } |
472 | union() { | 474 | union() { |
473 | duct("in"); output("in"); intake("in"); | 475 | duct("in"); output("in"); intake("in"); |
474 | } | 476 | } |
475 | } | 477 | } |
476 | } | 478 | } |
477 | 479 | ||
478 | view="*"; // hcut|vcut|* | 480 | view="*"; // hcut|vcut|* |
479 | 481 | ||
480 | hinfinity=4*(fanduct_ir+fanduct_shell*2+fanduct_w+inlet_away); | 482 | hinfinity=4*(fanduct_ir+fanduct_shell*2+fanduct_w+inlet_away); |
481 | vinfinity=2*(fanduct_shell*2+fanduct_h+inlet_h); | 483 | vinfinity=2*(fanduct_shell*2+fanduct_h+inlet_h); |
482 | if(view=="hcut") { | 484 | if(view=="hcut") { |
483 | difference() { | 485 | difference() { |
484 | fanduct(); | 486 | fanduct(); |
485 | translate([-hinfinity/2,-hinfinity/2,fanduct_shell+fanduct_h/2]) | 487 | translate([-hinfinity/2,-hinfinity/2,fanduct_shell+fanduct_h/2]) |
486 | cube(size=[hinfinity,hinfinity,vinfinity]); | 488 | cube(size=[hinfinity,hinfinity,vinfinity]); |
487 | } | 489 | } |