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 | |||
@@ -293,131 +293,133 @@ module fanduct(type=type,ductshape=ductshape,dual=dual) { | |||
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]); |