summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--fanduct.scad75
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
@@ -137,2 +137,35 @@ 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]);
+ }
+ }
+ }
@@ -141,2 +174,4 @@ module fanduct(type=type,ductshape=ductshape,dual=dual) {
dual_simple();
+ else if(type=="jets")
+ dual_complex();
else dual();
@@ -291,2 +326,39 @@ 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) {
@@ -315,2 +387,3 @@ module fanduct(type=type,ductshape=ductshape,dual=dual) {
if(type=="simple") dual_simple(what);
+ else if(type=="jets") dual_jets(what);
else dual(what);
@@ -366,3 +439,3 @@ module fanduct(type=type,ductshape=ductshape,dual=dual) {
module tails(what) {
- if(dual) {
+ if(dual && type=="simple") {
// XXX: not sure if it will ever be