-rw-r--r-- | fanduct.scad | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/fanduct.scad b/fanduct.scad index b9689c9..0cd89f7 100644 --- a/fanduct.scad +++ b/fanduct.scad | |||
@@ -212,7 +212,34 @@ module fanduct(type=type,ductshape=ductshape,dual=dual) { | |||
212 | } | 212 | } |
213 | } | 213 | } |
214 | 214 | ||
215 | if(type=="circular") circus(what); | 215 | module dual(what=what) { |
216 | module hulls(spots=dual_spots) { | ||
217 | for(my=[0,1]) mirror([0,my,0]) for(pn=[0:1:len(spots)-2]) hull() { | ||
218 | for(p=[spots[pn],spots[pn+1]]) translate(p) children(0); | ||
219 | children([1:$children-1]); | ||
220 | } | ||
221 | } | ||
222 | if(what=="in") { | ||
223 | difference() { | ||
224 | hulls() { | ||
225 | cylinder(d=fanduct_w+2*fanduct_shell,h=2*fanduct_shell+fanduct_h/2); | ||
226 | translate([0,-nozzles_apart/2,-fanduct_elevation-fanduct_blowtarget]) sphere(d=.1); | ||
227 | } | ||
228 | translate([0,0,epsilon]) hull() for(my=[0:1]) mirror([0,my,0]) for(s=dual_spots) translate(s) | ||
229 | mirror([0,0,1]) cylinder(d=fanduct_w+2*fanduct_shell+2,h=fanduct_elevation-fanduct_blowtarget+1); | ||
230 | for(s=[-1,1]) translate([0,s*nozzles_apart/2,-1]) | ||
231 | cylinder(r=hotend_clearance,h=fanduct_h+2*fanduct_shell+2,$fn=smooth_f); | ||
232 | } | ||
233 | }else if(what=="out") { | ||
234 | hulls() { | ||
235 | translate([0,0,fanduct_shell]) cylinder(d=fanduct_w,h=fanduct_h/2-fanduct_shell/2); | ||
236 | translate([0,-nozzles_apart/2,-fanduct_elevation+fanduct_blowtarget]) sphere(d=.1); | ||
237 | } | ||
238 | } | ||
239 | } | ||
240 | |||
241 | if(dual) dual(what); | ||
242 | else if(type=="circular") circus(what); | ||
216 | else if(type=="3jets") jets(what); | 243 | else if(type=="3jets") jets(what); |
217 | } | 244 | } |
218 | 245 | ||