-rw-r--r-- | fanduct.scad | 66 |
1 files changed, 61 insertions, 5 deletions
diff --git a/fanduct.scad b/fanduct.scad index 52aee0e..a17b261 100644 --- a/fanduct.scad +++ b/fanduct.scad | |||
@@ -1,12 +1,12 @@ | |||
1 | use <snapper.scad>; | 1 | use <snapper.scad>; |
2 | extrusion_width=.5; layer_height=.2; // print parameters | 2 | extrusion_width=.5; layer_height=.2; // print parameters |
3 | 3 | ||
4 | epsilon=.005; // for finer cuts | 4 | epsilon=.005; // for finer cuts |
5 | 5 | ||
6 | type="circular"; // circular|3jets | 6 | type="simple"; // circular|3jets |
7 | ductshape="square"; // square|round | 7 | ductshape="square"; // square|round |
8 | dual=true; // dual or single | 8 | dual=true; // dual or single |
9 | 9 | ||
10 | nozzles_apart = 18; // distance between nozzles for dual hotend | 10 | nozzles_apart = 18; // distance between nozzles for dual hotend |
11 | space_behind_nozzle = 10;// space behind the nozzle where we're allowed to go | 11 | space_behind_nozzle = 10;// space behind the nozzle where we're allowed to go |
12 | // without the fear of hitting carriage | 12 | // without the fear of hitting carriage |
@@ -101,15 +101,47 @@ module fanduct(type=type,ductshape=ductshape,dual=dual) { | |||
101 | translate([0,0,-1]) | 101 | translate([0,0,-1]) |
102 | cylinder(d=smax+2,h=smax+2,$fn=36); | 102 | cylinder(d=smax+2,h=smax+2,$fn=36); |
103 | } | 103 | } |
104 | } | 104 | } |
105 | } | 105 | } |
106 | } | 106 | } |
107 | module dual_simple() { | ||
108 | for(my=[0,1]) mirror([0,my,0]) | ||
109 | if(what=="in") { | ||
110 | sh = fanduct_w+2*fanduct_shell; sv = fanduct_h+2*fanduct_shell; | ||
111 | translate([0,nozzles_apart/2,0]) | ||
112 | intersection() { | ||
113 | rotate_extrude($fn=smooth_f) | ||
114 | translate([fanduct_ir,0]) square([sh,sv]); | ||
115 | translate([-fanduct_ir-sh-1,0,-1]) | ||
116 | cube(size=[fanduct_ir+sh+2,fanduct_ir+sh+2,sv+2]); | ||
117 | } | ||
118 | translate([-fanduct_ir-sh,-epsilon,0]) | ||
119 | cube(size=[sh,nozzles_apart/2+2*epsilon,sv]); | ||
120 | translate([0,sh/2+fanduct_ir+nozzles_apart/2,0]) cylinder(d=sh,h=sv,$fn=36); | ||
121 | }else if(what=="out") { | ||
122 | sh = fanduct_w; sv = fanduct_h; | ||
123 | translate([0,nozzles_apart/2,fanduct_shell]) | ||
124 | intersection() { | ||
125 | rotate_extrude($fn=smooth_f) | ||
126 | translate([fanduct_ir+fanduct_shell,0]) square([sh,sv]); | ||
127 | translate([-fanduct_ir-2*fanduct_shell-sh-1,-1,0]) | ||
128 | cube(size=[fanduct_ir+2*fanduct_shell+sh+2,fanduct_ir+2*fanduct_shell+sh+2,sv]); | ||
129 | } | ||
130 | translate([-fanduct_ir-fanduct_shell-sh,-epsilon,fanduct_shell]) | ||
131 | cube(size=[sh,nozzles_apart/2+2*epsilon,sv]); | ||
132 | translate([0,sh/2+fanduct_shell+fanduct_ir+nozzles_apart/2,fanduct_shell]) | ||
133 | cylinder(d=sh,h=sv,$fn=36); | ||
134 | } | ||
135 | } | ||
107 | 136 | ||
108 | if(dual) dual(); | 137 | if(dual) { |
109 | else single(); | 138 | if(type=="simple") |
139 | dual_simple(); | ||
140 | else dual(); | ||
141 | }else single(); | ||
110 | } | 142 | } |
111 | 143 | ||
112 | // ***bumps for easier position adjustments in line with hotend | 144 | // ***bumps for easier position adjustments in line with hotend |
113 | module marks(what) { | 145 | module marks(what) { |
114 | if(what=="in") { | 146 | if(what=="in") { |
115 | for(y=[-1,1]) translate([0,dual?y*nozzles_apart/2:0,0]) | 147 | for(y=[-1,1]) translate([0,dual?y*nozzles_apart/2:0,0]) |
@@ -252,14 +284,38 @@ module fanduct(type=type,ductshape=ductshape,dual=dual) { | |||
252 | guideline([ [0 ,nozzles_apart/2+near+fanduct_w*space_behind_nozzle/to_midduct] ]); | 284 | guideline([ [0 ,nozzles_apart/2+near+fanduct_w*space_behind_nozzle/to_midduct] ]); |
253 | } | 285 | } |
254 | } | 286 | } |
255 | } | 287 | } |
256 | } | 288 | } |
257 | 289 | ||
258 | if(dual) dual(what); | 290 | module dual_simple(what=what) { |
259 | else if(type=="circular") circus(what); | 291 | for(my=[0:1]) mirror([0,my,0]) if(what=="in") { |
292 | difference() { | ||
293 | hull() { | ||
294 | translate([0,nozzles_apart/2+fanduct_ir+fanduct_shell+fanduct_w/2,0]) | ||
295 | cylinder(d=fanduct_w+2*fanduct_shell,h=fanduct_h*2/3+2*fanduct_shell); | ||
296 | translate([0,nozzles_apart/2,-fanduct_elevation+fanduct_blowtarget]) | ||
297 | rotate([0,90,0]) cylinder(r=.5,h=fanduct_w*2,center=true); | ||
298 | } | ||
299 | rr = 2*(fanduct_ir+fanduct_shell*2+fanduct_w+2); | ||
300 | translate([-rr/2,0,0]) mirror([0,0,1]) cube(size=[rr,rr,rr]); | ||
301 | } | ||
302 | }else if(what=="out") { | ||
303 | hull() { | ||
304 | translate([0,nozzles_apart/2+fanduct_ir+fanduct_shell+fanduct_w/2,fanduct_shell]) | ||
305 | cylinder(d=fanduct_w,h=fanduct_h*2/3); | ||
306 | translate([0,nozzles_apart/2,-fanduct_elevation+fanduct_blowtarget]) | ||
307 | rotate([0,90,0]) cylinder(d=.5,h=fanduct_w*2,center=true); | ||
308 | } | ||
309 | } | ||
310 | } | ||
311 | |||
312 | if(dual) { | ||
313 | if(type=="simple") dual_simple(what); | ||
314 | else dual(what); | ||
315 | }else if(type=="circular") circus(what); | ||
260 | else if(type=="3jets") jets(what); | 316 | else if(type=="3jets") jets(what); |
261 | } | 317 | } |
262 | 318 | ||
263 | // ***air intake | 319 | // ***air intake |
264 | module intake(what) { | 320 | module intake(what) { |
265 | module placeit() { | 321 | module placeit() { |