summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--fanduct.scad66
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,18 +1,18 @@
1use <snapper.scad>; 1use <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
13 13
14 inlet_w = 12.5; // inlet width 14 inlet_w = 12.5; // inlet width
15 inlet_h = 17; // inlet height 15 inlet_h = 17; // inlet height
16 inlet_short_l = 7;// inlet length of protrusion (or depth of intrusion:)) 16 inlet_short_l = 7;// inlet length of protrusion (or depth of intrusion:))
17 inlet_away = 15;// how far away inlet is 17 inlet_away = 15;// how far away inlet is
18 18
@@ -95,27 +95,59 @@ module fanduct(type=type,ductshape=ductshape,dual=dual) {
95 translate([0,0,fanduct_shell]) hulls() { 95 translate([0,0,fanduct_shell]) hulls() {
96 cylinder(d=fanduct_w,h=fanduct_h/2); 96 cylinder(d=fanduct_w,h=fanduct_h/2);
97 translate([0,0,fanduct_h/2]) 97 translate([0,0,fanduct_h/2])
98 scale([sh/smax,sh/smax,sv/smax]) 98 scale([sh/smax,sh/smax,sv/smax])
99 intersection() { 99 intersection() {
100 sphere(d=smax,$fn=36); 100 sphere(d=smax,$fn=36);
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])
116 hull() for(z=[0,-fanduct_shell-fanduct_h/2]) 148 hull() for(z=[0,-fanduct_shell-fanduct_h/2])
117 translate([0,y*(fanduct_ir+fanduct_shell+fanduct_w/2),fanduct_shell*2+fanduct_h+z]) 149 translate([0,y*(fanduct_ir+fanduct_shell+fanduct_w/2),fanduct_shell*2+fanduct_h+z])
118 rotate([90,0,0]) { 150 rotate([90,0,0]) {
119 cylinder(r=fanduct_shell,h=fanduct_w,center=true,$fn=30); 151 cylinder(r=fanduct_shell,h=fanduct_w,center=true,$fn=30);
120 for(z=[-1,1]) translate([0,0,z*fanduct_w/2]) 152 for(z=[-1,1]) translate([0,0,z*fanduct_w/2])
121 sphere(r=fanduct_shell,$fn=30); 153 sphere(r=fanduct_shell,$fn=30);
@@ -246,26 +278,50 @@ module fanduct(type=type,ductshape=ductshape,dual=dual) {
246 for(my=[0,1]) mirror([0,my,0]) { 278 for(my=[0,1]) mirror([0,my,0]) {
247 guideline([ [-far ,0], [0, nozzles_apart/8] ]); 279 guideline([ [-far ,0], [0, nozzles_apart/8] ]);
248 guideline([ [-far ,inlet_w/2/4 ], 280 guideline([ [-far ,inlet_w/2/4 ],
249 [-near ,to_midduct/2] ]); 281 [-near ,to_midduct/2] ]);
250 guideline([ [-near-fanduct_w/3, to_midduct/2 ], 282 guideline([ [-near-fanduct_w/3, to_midduct/2 ],
251 [-near ,nozzles_apart/2+near ] ]); 283 [-near ,nozzles_apart/2+near ] ]);
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() {
266 translate([-fanduct_ir-2*fanduct_shell-fanduct_w-inlet_away,0,fanduct_shell]) 322 translate([-fanduct_ir-2*fanduct_shell-fanduct_w-inlet_away,0,fanduct_shell])
267 rotate([0,-90,0]) 323 rotate([0,-90,0])
268 children(); 324 children();
269 } 325 }
270 if(what=="in") { 326 if(what=="in") {
271 placeit() translate([0,-inlet_w/2,0]) { 327 placeit() translate([0,-inlet_w/2,0]) {