author | Michael Krelin <hacker@klever.net> | 2016-07-21 21:38:59 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2016-07-21 21:38:59 (UTC) |
commit | 9b39333e40abf93141ee39f40ef3733890ee0db8 (patch) (unidiff) | |
tree | 125a56fc01499ee602e6f918a8b910fef5e6f0e3 /fanduct.scad | |
parent | 9cceb044d036c37c8c8703926c9c84d1d88cc2e0 (diff) | |
download | fanductory-9b39333e40abf93141ee39f40ef3733890ee0db8.zip fanductory-9b39333e40abf93141ee39f40ef3733890ee0db8.tar.gz fanductory-9b39333e40abf93141ee39f40ef3733890ee0db8.tar.bz2 |
more advanced chimera hotend
-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 | |||
@@ -114,52 +114,87 @@ module fanduct(type=type,ductshape=ductshape,dual=dual) { | |||
114 | intersection() { | 114 | intersection() { |
115 | rotate_extrude($fn=smooth_f) | 115 | rotate_extrude($fn=smooth_f) |
116 | translate([fanduct_ir,0]) square([sh,sv]); | 116 | translate([fanduct_ir,0]) square([sh,sv]); |
117 | translate([-fanduct_ir-sh-1,0,-1]) | 117 | translate([-fanduct_ir-sh-1,0,-1]) |
118 | cube(size=[fanduct_ir+sh+2,fanduct_ir+sh+2,sv+2]); | 118 | cube(size=[fanduct_ir+sh+2,fanduct_ir+sh+2,sv+2]); |
119 | } | 119 | } |
120 | translate([-fanduct_ir-sh,-epsilon,0]) | 120 | translate([-fanduct_ir-sh,-epsilon,0]) |
121 | cube(size=[sh,nozzles_apart/2+2*epsilon,sv]); | 121 | cube(size=[sh,nozzles_apart/2+2*epsilon,sv]); |
122 | translate([0,sh/2+fanduct_ir+nozzles_apart/2,0]) cylinder(d=sh,h=sv,$fn=36); | 122 | translate([0,sh/2+fanduct_ir+nozzles_apart/2,0]) cylinder(d=sh,h=sv,$fn=36); |
123 | }else if(what=="out") { | 123 | }else if(what=="out") { |
124 | sh = fanduct_w; sv = fanduct_h; | 124 | sh = fanduct_w; sv = fanduct_h; |
125 | translate([0,nozzles_apart/2,fanduct_shell]) | 125 | translate([0,nozzles_apart/2,fanduct_shell]) |
126 | intersection() { | 126 | intersection() { |
127 | rotate_extrude($fn=smooth_f) | 127 | rotate_extrude($fn=smooth_f) |
128 | translate([fanduct_ir+fanduct_shell,0]) square([sh,sv]); | 128 | translate([fanduct_ir+fanduct_shell,0]) square([sh,sv]); |
129 | translate([-fanduct_ir-2*fanduct_shell-sh-1,-1,0]) | 129 | translate([-fanduct_ir-2*fanduct_shell-sh-1,-1,0]) |
130 | cube(size=[fanduct_ir+2*fanduct_shell+sh+2,fanduct_ir+2*fanduct_shell+sh+2,sv]); | 130 | cube(size=[fanduct_ir+2*fanduct_shell+sh+2,fanduct_ir+2*fanduct_shell+sh+2,sv]); |
131 | } | 131 | } |
132 | translate([-fanduct_ir-fanduct_shell-sh,-epsilon,fanduct_shell]) | 132 | translate([-fanduct_ir-fanduct_shell-sh,-epsilon,fanduct_shell]) |
133 | cube(size=[sh,nozzles_apart/2+2*epsilon,sv]); | 133 | cube(size=[sh,nozzles_apart/2+2*epsilon,sv]); |
134 | translate([0,sh/2+fanduct_shell+fanduct_ir+nozzles_apart/2,fanduct_shell]) | 134 | translate([0,sh/2+fanduct_shell+fanduct_ir+nozzles_apart/2,fanduct_shell]) |
135 | cylinder(d=sh,h=sv,$fn=36); | 135 | cylinder(d=sh,h=sv,$fn=36); |
136 | } | 136 | } |
137 | } | 137 | } |
138 | module dual_complex() { | ||
139 | for(my=[0,1]) mirror([0,my,0]) | ||
140 | if(what=="in") { | ||
141 | sh = fanduct_w+2*fanduct_shell; | ||
142 | sv = fanduct_h+2*fanduct_shell; | ||
143 | for(mx=[0,1]) mirror([mx,0,0]) | ||
144 | mirror([0,1,0]) rotate([90,0,0]) | ||
145 | translate([0,0,-1]) | ||
146 | linear_extrude(height=nozzles_apart/2+1+epsilon) | ||
147 | ductshape(sh=sh,sv=sv,r=fanduct_ir,what=what); | ||
148 | translate([0,nozzles_apart/2,0]) | ||
149 | difference() { | ||
150 | rotate_extrude($fn=smooth_f) | ||
151 | ductshape(sh=sh,sv=sv,r=fanduct_ir,what=what); | ||
152 | mirror([0,1,0]) translate([-fanduct_ir-sh-1,0,-1]) | ||
153 | cube(size=[2*(fanduct_ir+sh+1),fanduct_ir+sh+1,sv+2]); | ||
154 | } | ||
155 | }else{ | ||
156 | sh = fanduct_w; sv = fanduct_h; | ||
157 | for(mx=[0,1]) mirror([mx,0,0]) | ||
158 | mirror([0,1,0]) rotate([90,0,0]) | ||
159 | translate([0,0,-1]) | ||
160 | linear_extrude(height=nozzles_apart/2+1+epsilon) | ||
161 | ductshape(sh=sh,sv=sv,r=fanduct_ir,what=what); | ||
162 | translate([0,nozzles_apart/2,0]) | ||
163 | difference() { | ||
164 | rotate_extrude($fn=smooth_f) | ||
165 | ductshape(sh=sh,sv=sv,r=fanduct_ir,what=what); | ||
166 | mirror([0,1,0]) translate([-fanduct_ir-sh-1,0,-1]) | ||
167 | cube(size=[2*(fanduct_ir+sh+1),fanduct_ir+sh+1,sv+2]); | ||
168 | } | ||
169 | } | ||
170 | } | ||
138 | 171 | ||
139 | if(dual) { | 172 | if(dual) { |
140 | if(type=="simple") | 173 | if(type=="simple") |
141 | dual_simple(); | 174 | dual_simple(); |
175 | else if(type=="jets") | ||
176 | dual_complex(); | ||
142 | else dual(); | 177 | else dual(); |
143 | }else single(); | 178 | }else single(); |
144 | } | 179 | } |
145 | 180 | ||
146 | // ***bumps for easier position adjustments in line with hotend | 181 | // ***bumps for easier position adjustments in line with hotend |
147 | module marks(what) { | 182 | module marks(what) { |
148 | if(what=="in") { | 183 | if(what=="in") { |
149 | for(y=[-1,1]) translate([0,dual?y*nozzles_apart/2:0,0]) | 184 | for(y=[-1,1]) translate([0,dual?y*nozzles_apart/2:0,0]) |
150 | hull() for(z=[0,-fanduct_shell-fanduct_h/2]) | 185 | hull() for(z=[0,-fanduct_shell-fanduct_h/2]) |
151 | translate([0,y*(fanduct_ir+fanduct_shell+fanduct_w/2),fanduct_shell*2+fanduct_h+z]) | 186 | translate([0,y*(fanduct_ir+fanduct_shell+fanduct_w/2),fanduct_shell*2+fanduct_h+z]) |
152 | rotate([90,0,0]) { | 187 | rotate([90,0,0]) { |
153 | cylinder(r=fanduct_shell,h=fanduct_w,center=true,$fn=30); | 188 | cylinder(r=fanduct_shell,h=fanduct_w,center=true,$fn=30); |
154 | for(z=[-1,1]) translate([0,0,z*fanduct_w/2]) | 189 | for(z=[-1,1]) translate([0,0,z*fanduct_w/2]) |
155 | sphere(r=fanduct_shell,$fn=30); | 190 | sphere(r=fanduct_shell,$fn=30); |
156 | } | 191 | } |
157 | } | 192 | } |
158 | } | 193 | } |
159 | 194 | ||
160 | // ***output | 195 | // ***output |
161 | module output(what,type=type) { | 196 | module output(what,type=type) { |
162 | module guideline(xyxy) { | 197 | module guideline(xyxy) { |
163 | module pin(xy) { | 198 | module pin(xy) { |
164 | translate([xy[0],xy[1],0]) | 199 | translate([xy[0],xy[1],0]) |
165 | cylinder(d=2*extrusion_width,h=2*fanduct_shell+inlet_h,$fn=6); | 200 | cylinder(d=2*extrusion_width,h=2*fanduct_shell+inlet_h,$fn=6); |
@@ -268,72 +303,110 @@ module fanduct(type=type,ductshape=ductshape,dual=dual) { | |||
268 | for(s=[-1,1]) translate([0,s*nozzles_apart/2,-1]) | 303 | for(s=[-1,1]) translate([0,s*nozzles_apart/2,-1]) |
269 | 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); |
270 | } | 305 | } |
271 | }else if(what=="out") { | 306 | }else if(what=="out") { |
272 | hulls() { | 307 | hulls() { |
273 | 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); |
274 | 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); |
275 | } | 310 | } |
276 | }else if(what=="airguides") { | 311 | }else if(what=="airguides") { |
277 | far = fanduct_ir+fanduct_shell+fanduct_w; | 312 | far = fanduct_ir+fanduct_shell+fanduct_w; |
278 | near = fanduct_ir; | 313 | near = fanduct_ir; |
279 | union() { | 314 | union() { |
280 | for(my=[0,1]) mirror([0,my,0]) { | 315 | for(my=[0,1]) mirror([0,my,0]) { |
281 | guideline([ [-far ,0], [0, nozzles_apart/8] ]); | 316 | guideline([ [-far ,0], [0, nozzles_apart/8] ]); |
282 | guideline([ [-far ,inlet_w/2/4 ], | 317 | guideline([ [-far ,inlet_w/2/4 ], |
283 | [-near ,to_midduct/2] ]); | 318 | [-near ,to_midduct/2] ]); |
284 | guideline([ [-near-fanduct_w/3, to_midduct/2 ], | 319 | guideline([ [-near-fanduct_w/3, to_midduct/2 ], |
285 | [-near ,nozzles_apart/2+near ] ]); | 320 | [-near ,nozzles_apart/2+near ] ]); |
286 | 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] ]); |
287 | } | 322 | } |
288 | } | 323 | } |
289 | } | 324 | } |
290 | } | 325 | } |
291 | 326 | ||
327 | module dual_jets(what=what) { | ||
328 | od=fanduct_h*2/3+fanduct_shell; | ||
329 | md=fanduct_ir+fanduct_shell+fanduct_w/2; | ||
330 | jww = 2*md*sin(jet_angle/2); | ||
331 | difference() { | ||
332 | for(my=[0,1]) mirror([0,my,0]) | ||
333 | translate([0,nozzles_apart/2,0]) | ||
334 | for(a=[45,135]) rotate([0,0,a]) | ||
335 | if(what=="in") { | ||
336 | hull() { | ||
337 | intersection() { | ||
338 | translate([md-fanduct_w/2,-jww/2,0]) | ||
339 | cube(size=[fanduct_shell+fanduct_w/2,jww,od]); | ||
340 | rotate([0,0,-a]) translate([0,-nozzles_apart/2,0]) duct(what=what); | ||
341 | } // intersection | ||
342 | translate([0,0,-fanduct_elevation]) sphere(r=.5); | ||
343 | } // hull | ||
344 | }else if(what=="out") { | ||
345 | hull() { | ||
346 | intersection() { | ||
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]); | ||
349 | rotate([0,0,-a]) translate([0,-nozzles_apart/2,0]) duct(what=what); | ||
350 | } // intersection | ||
351 | translate([0,0,-fanduct_elevation]) sphere(r=.5); | ||
352 | } // hull | ||
353 | } // what=="out" | ||
354 | if(what=="in") { | ||
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); | ||
357 | for(my=[0,1]) mirror([0,my,0]) | ||
358 | translate([0,nozzles_apart/2,-hotend_clearance]) | ||
359 | cylinder(r1=hotend_clearance*2,r2=0,h=hotend_clearance*2,$fn=4); | ||
360 | } | ||
361 | } // difference | ||
362 | } | ||
363 | |||
292 | module dual_simple(what=what) { | 364 | module dual_simple(what=what) { |
293 | for(my=[0:1]) mirror([0,my,0]) if(what=="in") { | 365 | for(my=[0:1]) mirror([0,my,0]) if(what=="in") { |
294 | difference() { | 366 | difference() { |
295 | hull() { | 367 | hull() { |
296 | translate([0,nozzles_apart/2+fanduct_ir+fanduct_shell+fanduct_w/2,0]) | 368 | translate([0,nozzles_apart/2+fanduct_ir+fanduct_shell+fanduct_w/2,0]) |
297 | cylinder(d=fanduct_w+2*fanduct_shell,h=fanduct_h*2/3+2*fanduct_shell); | 369 | cylinder(d=fanduct_w+2*fanduct_shell,h=fanduct_h*2/3+2*fanduct_shell); |
298 | translate([0,nozzles_apart/2,-fanduct_elevation+fanduct_blowtarget]) | 370 | translate([0,nozzles_apart/2,-fanduct_elevation+fanduct_blowtarget]) |
299 | rotate([0,90,0]) cylinder(r=.5,h=fanduct_w*2,center=true); | 371 | rotate([0,90,0]) cylinder(r=.5,h=fanduct_w*2,center=true); |
300 | } | 372 | } |
301 | rr = 2*(fanduct_ir+fanduct_shell*2+fanduct_w+2); | 373 | rr = 2*(fanduct_ir+fanduct_shell*2+fanduct_w+2); |
302 | translate([-rr/2,0,0]) mirror([0,0,1]) cube(size=[rr,rr,rr]); | 374 | translate([-rr/2,0,0]) mirror([0,0,1]) cube(size=[rr,rr,rr]); |
303 | } | 375 | } |
304 | }else if(what=="out") { | 376 | }else if(what=="out") { |
305 | hull() { | 377 | hull() { |
306 | translate([0,nozzles_apart/2+fanduct_ir+fanduct_shell+fanduct_w/2,fanduct_shell]) | 378 | translate([0,nozzles_apart/2+fanduct_ir+fanduct_shell+fanduct_w/2,fanduct_shell]) |
307 | cylinder(d=fanduct_w,h=fanduct_h*2/3); | 379 | cylinder(d=fanduct_w,h=fanduct_h*2/3); |
308 | translate([0,nozzles_apart/2,-fanduct_elevation+fanduct_blowtarget]) | 380 | translate([0,nozzles_apart/2,-fanduct_elevation+fanduct_blowtarget]) |
309 | rotate([0,90,0]) cylinder(d=.5,h=fanduct_w*2,center=true); | 381 | rotate([0,90,0]) cylinder(d=.5,h=fanduct_w*2,center=true); |
310 | } | 382 | } |
311 | } | 383 | } |
312 | } | 384 | } |
313 | 385 | ||
314 | if(dual) { | 386 | if(dual) { |
315 | if(type=="simple") dual_simple(what); | 387 | if(type=="simple") dual_simple(what); |
388 | else if(type=="jets") dual_jets(what); | ||
316 | else dual(what); | 389 | else dual(what); |
317 | }else if(type=="circular") circus(what); | 390 | }else if(type=="circular") circus(what); |
318 | else if(type=="3jets") jets(what); | 391 | else if(type=="3jets") jets(what); |
319 | } | 392 | } |
320 | 393 | ||
321 | // ***air intake | 394 | // ***air intake |
322 | module intake(what) { | 395 | module intake(what) { |
323 | module placeit() { | 396 | module placeit() { |
324 | translate([-fanduct_ir-2*fanduct_shell-fanduct_w-inlet_away,0,fanduct_shell]) | 397 | translate([-fanduct_ir-2*fanduct_shell-fanduct_w-inlet_away,0,fanduct_shell]) |
325 | rotate([0,-90,0]) | 398 | rotate([0,-90,0]) |
326 | children(); | 399 | children(); |
327 | } | 400 | } |
328 | if(what=="in") { | 401 | if(what=="in") { |
329 | placeit() translate([0,-inlet_w/2,0]) { | 402 | placeit() translate([0,-inlet_w/2,0]) { |
330 | difference() { | 403 | difference() { |
331 | cube(size=[inlet_h,inlet_w,inlet_long_l+fanduct_shell]); translate([inlet_h+fanduct_shell,0,inlet_long_l+fanduct_shell]) | 404 | cube(size=[inlet_h,inlet_w,inlet_long_l+fanduct_shell]); translate([inlet_h+fanduct_shell,0,inlet_long_l+fanduct_shell]) |
332 | rotate([-90,0,0]) | 405 | rotate([-90,0,0]) |
333 | translate([0,0,-1]) | 406 | translate([0,0,-1]) |
334 | cylinder(r=inlet_h,h=inlet_w+2*fanduct_shell+2,$fn=inlet_h*4); | 407 | cylinder(r=inlet_h,h=inlet_w+2*fanduct_shell+2,$fn=inlet_h*4); |
335 | } | 408 | } |
336 | // supports | 409 | // supports |
337 | for(i=[-1,0,1]) | 410 | for(i=[-1,0,1]) |
338 | translate([-fanduct_shell, | 411 | translate([-fanduct_shell, |
339 | (i+1)*(inlet_w-extrusion_width)/2, | 412 | (i+1)*(inlet_w-extrusion_width)/2, |
@@ -343,49 +416,49 @@ module fanduct(type=type,ductshape=ductshape,dual=dual) { | |||
343 | inlet_long_l+fanduct_shell+inlet_away+fanduct_w/2]); | 416 | inlet_long_l+fanduct_shell+inlet_away+fanduct_w/2]); |
344 | } | 417 | } |
345 | hull() { | 418 | hull() { |
346 | placeit() translate([-fanduct_shell,-inlet_w/2-fanduct_shell,0]) | 419 | placeit() translate([-fanduct_shell,-inlet_w/2-fanduct_shell,0]) |
347 | cube(size=[inlet_h+2*fanduct_shell,inlet_w+2*fanduct_shell,fanduct_shell]); | 420 | cube(size=[inlet_h+2*fanduct_shell,inlet_w+2*fanduct_shell,fanduct_shell]); |
348 | translate([-fanduct_ir-fanduct_shell-fanduct_w/2,0,0]) | 421 | translate([-fanduct_ir-fanduct_shell-fanduct_w/2,0,0]) |
349 | translate([0,-inlet_w/2-fanduct_shell/2,0]) | 422 | translate([0,-inlet_w/2-fanduct_shell/2,0]) |
350 | cube(size=[1,inlet_w+fanduct_shell,fanduct_shell*2+fanduct_h]); | 423 | cube(size=[1,inlet_w+fanduct_shell,fanduct_shell*2+fanduct_h]); |
351 | } | 424 | } |
352 | }else if(what=="out") { | 425 | }else if(what=="out") { |
353 | placeit() translate([fanduct_shell,-inlet_w/2+fanduct_shell,0]) | 426 | placeit() translate([fanduct_shell,-inlet_w/2+fanduct_shell,0]) |
354 | cube(size=[inlet_h-2*fanduct_shell,inlet_w-2*fanduct_shell,inlet_long_l+fanduct_shell+1]); | 427 | cube(size=[inlet_h-2*fanduct_shell,inlet_w-2*fanduct_shell,inlet_long_l+fanduct_shell+1]); |
355 | hull() { | 428 | hull() { |
356 | placeit() translate([fanduct_shell,-inlet_w/2+fanduct_shell,0]) | 429 | placeit() translate([fanduct_shell,-inlet_w/2+fanduct_shell,0]) |
357 | cube(size=[inlet_h-2*fanduct_shell,inlet_w-2*fanduct_shell,fanduct_shell]); | 430 | cube(size=[inlet_h-2*fanduct_shell,inlet_w-2*fanduct_shell,fanduct_shell]); |
358 | translate([-fanduct_ir-fanduct_shell-fanduct_w/2,0,fanduct_shell]) | 431 | translate([-fanduct_ir-fanduct_shell-fanduct_w/2,0,fanduct_shell]) |
359 | translate([0,-inlet_w/2+fanduct_shell,0]) | 432 | translate([0,-inlet_w/2+fanduct_shell,0]) |
360 | cube(size=[1,inlet_w-2*fanduct_shell,fanduct_h]); | 433 | cube(size=[1,inlet_w-2*fanduct_shell,fanduct_h]); |
361 | } | 434 | } |
362 | } | 435 | } |
363 | } | 436 | } |
364 | 437 | ||
365 | // ***DUCT TAILS!!! WOO-OO! (every day they're out there making duct tails…) | 438 | // ***DUCT TAILS!!! WOO-OO! (every day they're out there making duct tails…) |
366 | module tails(what) { | 439 | module tails(what) { |
367 | if(dual) { | 440 | if(dual && type=="simple") { |
368 | // XXX: not sure if it will ever be | 441 | // XXX: not sure if it will ever be |
369 | }else{ | 442 | }else{ |
370 | if(what=="in") { | 443 | if(what=="in") { |
371 | for(mx=[0,1]) mirror([mx,0,0]) | 444 | for(mx=[0,1]) mirror([mx,0,0]) |
372 | translate([fanduct_ir+fanduct_shell+fanduct_w/2,0,fanduct_shell+fanduct_h/2]) | 445 | translate([fanduct_ir+fanduct_shell+fanduct_w/2,0,fanduct_shell+fanduct_h/2]) |
373 | rotate([90,0,90]) | 446 | rotate([90,0,90]) |
374 | translate([0,0,-snapper_d/2]) | 447 | translate([0,0,-snapper_d/2]) |
375 | snapper(d=snapper_d,o=snapper_overlap,side=0,l=fanduct_h*3/2+fanduct_shell); | 448 | snapper(d=snapper_d,o=snapper_overlap,side=0,l=fanduct_h*3/2+fanduct_shell); |
376 | } | 449 | } |
377 | } | 450 | } |
378 | } | 451 | } |
379 | 452 | ||
380 | module parts(what) { | 453 | module parts(what) { |
381 | union() { | 454 | union() { |
382 | duct(what); | 455 | duct(what); |
383 | marks(what); | 456 | marks(what); |
384 | output(what); | 457 | output(what); |
385 | intake(what); | 458 | intake(what); |
386 | tails(what); | 459 | tails(what); |
387 | } | 460 | } |
388 | } | 461 | } |
389 | 462 | ||
390 | difference() { | 463 | difference() { |
391 | parts("in"); | 464 | parts("in"); |