-rw-r--r-- | fanduct.scad | 75 |
1 files changed, 74 insertions, 1 deletions
diff --git a/fanduct.scad b/fanduct.scad index ba63717..2bc5623 100644 --- a/fanduct.scad +++ b/fanduct.scad @@ -136,8 +136,43 @@ module fanduct(type=type,ductshape=ductshape,dual=dual) { } } + module dual_complex() { + for(my=[0,1]) mirror([0,my,0]) + if(what=="in") { + sh = fanduct_w+2*fanduct_shell; + sv = fanduct_h+2*fanduct_shell; + for(mx=[0,1]) mirror([mx,0,0]) + mirror([0,1,0]) rotate([90,0,0]) + translate([0,0,-1]) + linear_extrude(height=nozzles_apart/2+1+epsilon) + ductshape(sh=sh,sv=sv,r=fanduct_ir,what=what); + translate([0,nozzles_apart/2,0]) + difference() { + rotate_extrude($fn=smooth_f) + ductshape(sh=sh,sv=sv,r=fanduct_ir,what=what); + mirror([0,1,0]) translate([-fanduct_ir-sh-1,0,-1]) + cube(size=[2*(fanduct_ir+sh+1),fanduct_ir+sh+1,sv+2]); + } + }else{ + sh = fanduct_w; sv = fanduct_h; + for(mx=[0,1]) mirror([mx,0,0]) + mirror([0,1,0]) rotate([90,0,0]) + translate([0,0,-1]) + linear_extrude(height=nozzles_apart/2+1+epsilon) + ductshape(sh=sh,sv=sv,r=fanduct_ir,what=what); + translate([0,nozzles_apart/2,0]) + difference() { + rotate_extrude($fn=smooth_f) + ductshape(sh=sh,sv=sv,r=fanduct_ir,what=what); + mirror([0,1,0]) translate([-fanduct_ir-sh-1,0,-1]) + cube(size=[2*(fanduct_ir+sh+1),fanduct_ir+sh+1,sv+2]); + } + } + } if(dual) { if(type=="simple") dual_simple(); + else if(type=="jets") + dual_complex(); else dual(); }else single(); @@ -290,4 +325,41 @@ module fanduct(type=type,ductshape=ductshape,dual=dual) { } + module dual_jets(what=what) { + od=fanduct_h*2/3+fanduct_shell; + md=fanduct_ir+fanduct_shell+fanduct_w/2; + jww = 2*md*sin(jet_angle/2); + difference() { + for(my=[0,1]) mirror([0,my,0]) + translate([0,nozzles_apart/2,0]) + for(a=[45,135]) rotate([0,0,a]) + if(what=="in") { + hull() { + intersection() { + translate([md-fanduct_w/2,-jww/2,0]) + cube(size=[fanduct_shell+fanduct_w/2,jww,od]); + rotate([0,0,-a]) translate([0,-nozzles_apart/2,0]) duct(what=what); + } // intersection + translate([0,0,-fanduct_elevation]) sphere(r=.5); + } // hull + }else if(what=="out") { + hull() { + intersection() { + translate([md-fanduct_w/2,-jww/2+fanduct_shell,fanduct_shell]) + cube(size=[fanduct_w/2,jww-2*fanduct_shell,od-2*fanduct_shell]); + rotate([0,0,-a]) translate([0,-nozzles_apart/2,0]) duct(what=what); + } // intersection + translate([0,0,-fanduct_elevation]) sphere(r=.5); + } // hull + } // what=="out" + if(what=="in") { + translate([0,0,-fanduct_elevation/2-1+epsilon]) + 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); + for(my=[0,1]) mirror([0,my,0]) + translate([0,nozzles_apart/2,-hotend_clearance]) + cylinder(r1=hotend_clearance*2,r2=0,h=hotend_clearance*2,$fn=4); + } + } // difference + } + module dual_simple(what=what) { for(my=[0:1]) mirror([0,my,0]) if(what=="in") { @@ -314,4 +386,5 @@ module fanduct(type=type,ductshape=ductshape,dual=dual) { if(dual) { if(type=="simple") dual_simple(what); + else if(type=="jets") dual_jets(what); else dual(what); }else if(type=="circular") circus(what); @@ -365,5 +438,5 @@ module fanduct(type=type,ductshape=ductshape,dual=dual) { // *** DUCT TAILS!!! WOO-OO! (every day they're out there making duct tails…) module tails(what) { - if(dual) { + if(dual && type=="simple") { // XXX: not sure if it will ever be }else{ |