author | Michael Krelin <hacker@klever.net> | 2016-06-13 17:01:04 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2016-06-13 17:01:04 (UTC) |
commit | 9ea9868b95605c7a89e13720fe70cb68b88d3820 (patch) (unidiff) | |
tree | d3d7b4055b8e5fef7a3127964e90131c6c5d7813 | |
parent | 8ae83841f4b02964db406d2527d4e8a5b8d4906a (diff) | |
download | fanductory-9ea9868b95605c7a89e13720fe70cb68b88d3820.zip fanductory-9ea9868b95605c7a89e13720fe70cb68b88d3820.tar.gz fanductory-9ea9868b95605c7a89e13720fe70cb68b88d3820.tar.bz2 |
dualism: clear squarely
-rw-r--r-- | fanduct.scad | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fanduct.scad b/fanduct.scad index f5a7b7a..da89aac 100644 --- a/fanduct.scad +++ b/fanduct.scad | |||
@@ -135,193 +135,193 @@ module fanduct(type=type,ductshape=ductshape,dual=dual) { | |||
135 | module circus(what) { | 135 | module circus(what) { |
136 | if(what=="in") { | 136 | if(what=="in") { |
137 | difference() { | 137 | difference() { |
138 | rotate_extrude($fn=smooth_f) | 138 | rotate_extrude($fn=smooth_f) |
139 | polygon([ | 139 | polygon([ |
140 | [0,-fanduct_elevation+fanduct_blowtarget+epsilon], | 140 | [0,-fanduct_elevation+fanduct_blowtarget+epsilon], |
141 | [fanduct_ir+fanduct_shell,fanduct_shell+fanduct_h/2], | 141 | [fanduct_ir+fanduct_shell,fanduct_shell+fanduct_h/2], |
142 | [fanduct_ir+fanduct_shell+fanduct_w/2,0], | 142 | [fanduct_ir+fanduct_shell+fanduct_w/2,0], |
143 | [0,-fanduct_elevation+fanduct_blowtarget-epsilon]]); | 143 | [0,-fanduct_elevation+fanduct_blowtarget-epsilon]]); |
144 | translate([0,0,-1]) | 144 | translate([0,0,-1]) |
145 | cylinder(r=hotend_clearance,h=fanduct_h+2*fanduct_shell+2,$fn=smooth_f); | 145 | cylinder(r=hotend_clearance,h=fanduct_h+2*fanduct_shell+2,$fn=smooth_f); |
146 | mirror([0,0,1]) | 146 | mirror([0,0,1]) |
147 | translate([0,0,-epsilon]) | 147 | translate([0,0,-epsilon]) |
148 | cylinder(r=fanduct_ir+2*fanduct_shell+fanduct_w+1,h=fanduct_elevation+.1+2); | 148 | cylinder(r=fanduct_ir+2*fanduct_shell+fanduct_w+1,h=fanduct_elevation+.1+2); |
149 | } | 149 | } |
150 | }else if(what=="out") { | 150 | }else if(what=="out") { |
151 | rotate_extrude($fn=smooth_f) | 151 | rotate_extrude($fn=smooth_f) |
152 | polygon([ | 152 | polygon([ |
153 | [0,-fanduct_elevation+fanduct_blowtarget+epsilon], | 153 | [0,-fanduct_elevation+fanduct_blowtarget+epsilon], |
154 | [fanduct_ir+fanduct_shell+1,fanduct_h/2], | 154 | [fanduct_ir+fanduct_shell+1,fanduct_h/2], |
155 | [fanduct_ir+fanduct_w/2+fanduct_shell+1,fanduct_shell], | 155 | [fanduct_ir+fanduct_w/2+fanduct_shell+1,fanduct_shell], |
156 | [0,-fanduct_elevation+fanduct_blowtarget-epsilon]]); | 156 | [0,-fanduct_elevation+fanduct_blowtarget-epsilon]]); |
157 | }else if(what=="airguides") { | 157 | }else if(what=="airguides") { |
158 | inr = fanduct_ir+fanduct_shell; our = inr+fanduct_w; | 158 | inr = fanduct_ir+fanduct_shell; our = inr+fanduct_w; |
159 | union() { | 159 | union() { |
160 | for(my=[0,1]) mirror([0,my,0]) { | 160 | for(my=[0,1]) mirror([0,my,0]) { |
161 | guideline([ | 161 | guideline([ |
162 | [-our,inlet_w/6], | 162 | [-our,inlet_w/6], |
163 | [-inr*sin(60),inr*cos(60)] | 163 | [-inr*sin(60),inr*cos(60)] |
164 | ]); | 164 | ]); |
165 | a0=30; as=15; a1=180; | 165 | a0=30; as=15; a1=180; |
166 | for(a=[a0+as:as:a1]) { | 166 | for(a=[a0+as:as:a1]) { |
167 | f = as/(a1-a+as); | 167 | f = as/(a1-a+as); |
168 | rotate([0,0,a]) guideline([[-inr-fanduct_w*f,0]]); | 168 | rotate([0,0,a]) guideline([[-inr-fanduct_w*f,0]]); |
169 | } | 169 | } |
170 | guideline([ | 170 | guideline([ |
171 | [-our+fanduct_w*cos(30)*3/4,fanduct_w*sin(30)*3/4], | 171 | [-our+fanduct_w*cos(30)*3/4,fanduct_w*sin(30)*3/4], |
172 | [-inr*cos(10),inr*sin(10)] | 172 | [-inr*cos(10),inr*sin(10)] |
173 | ]); | 173 | ]); |
174 | } | 174 | } |
175 | }/*union*/ | 175 | }/*union*/ |
176 | }/*airguides*/ | 176 | }/*airguides*/ |
177 | } | 177 | } |
178 | 178 | ||
179 | module jets(what) { | 179 | module jets(what) { |
180 | od = fanduct_h*2/3+fanduct_shell; | 180 | od = fanduct_h*2/3+fanduct_shell; |
181 | md = fanduct_ir+fanduct_shell+fanduct_w/2; | 181 | md = fanduct_ir+fanduct_shell+fanduct_w/2; |
182 | jww = 2*md*sin(jet_angle/2); | 182 | jww = 2*md*sin(jet_angle/2); |
183 | difference() { | 183 | difference() { |
184 | for(a=[0:120:359]) rotate([0,0,a]) { | 184 | for(a=[0:120:359]) rotate([0,0,a]) { |
185 | if(what=="in") { | 185 | if(what=="in") { |
186 | hull() { | 186 | hull() { |
187 | intersection() { | 187 | intersection() { |
188 | translate([md-fanduct_w/2,-jww/2,0]) | 188 | translate([md-fanduct_w/2,-jww/2,0]) |
189 | cube(size=[fanduct_shell+fanduct_w/2,jww,od]); | 189 | cube(size=[fanduct_shell+fanduct_w/2,jww,od]); |
190 | duct(what=what); | 190 | duct(what=what); |
191 | } | 191 | } |
192 | translate([0,0,-fanduct_elevation]) sphere(r=.5); | 192 | translate([0,0,-fanduct_elevation]) sphere(r=.5); |
193 | } | 193 | } |
194 | }else if(what=="out") { | 194 | }else if(what=="out") { |
195 | hull() { | 195 | hull() { |
196 | intersection() { | 196 | intersection() { |
197 | translate([md-fanduct_w/2,-jww/2+fanduct_shell,fanduct_shell]) | 197 | translate([md-fanduct_w/2,-jww/2+fanduct_shell,fanduct_shell]) |
198 | cube(size=[fanduct_w/2,jww-2*fanduct_shell,od-2*fanduct_shell]); | 198 | cube(size=[fanduct_w/2,jww-2*fanduct_shell,od-2*fanduct_shell]); |
199 | duct(what=what); | 199 | duct(what=what); |
200 | } | 200 | } |
201 | translate([0,0,-fanduct_elevation]) sphere(r=.2); | 201 | translate([0,0,-fanduct_elevation]) sphere(r=.2); |
202 | } | 202 | } |
203 | } | 203 | } |
204 | } | 204 | } |
205 | if(what=="in") { | 205 | if(what=="in") { |
206 | translate([0,0,-fanduct_elevation-2+epsilon]) | 206 | translate([0,0,-fanduct_elevation-2+epsilon]) |
207 | cylinder(r=fanduct_ir+fanduct_shell*2+fanduct_w+1,h=fanduct_elevation+2); | 207 | cylinder(r=fanduct_ir+fanduct_shell*2+fanduct_w+1,h=fanduct_elevation+2); |
208 | translate([0,0,-hotend_clearance]) | 208 | translate([0,0,-hotend_clearance]) |
209 | rotate([0,0,30]) | 209 | rotate([0,0,30]) |
210 | cylinder(r1=hotend_clearance*2,r2=0,h=hotend_clearance*2,$fn=6); | 210 | cylinder(r1=hotend_clearance*2,r2=0,h=hotend_clearance*2,$fn=6); |
211 | } | 211 | } |
212 | } | 212 | } |
213 | } | 213 | } |
214 | 214 | ||
215 | module dual(what=what) { | 215 | module dual(what=what) { |
216 | module hulls(spots=dual_spots) { | 216 | module hulls(spots=dual_spots) { |
217 | for(my=[0,1]) mirror([0,my,0]) for(pn=[0:1:len(spots)-2]) hull() { | 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); | 218 | for(p=[spots[pn],spots[pn+1]]) translate(p) children(0); |
219 | children([1:$children-1]); | 219 | children([1:$children-1]); |
220 | } | 220 | } |
221 | } | 221 | } |
222 | if(what=="in") { | 222 | if(what=="in") { |
223 | difference() { | 223 | difference() { |
224 | hulls() { | 224 | hulls() { |
225 | cylinder(d=fanduct_w+2*fanduct_shell,h=2*fanduct_shell+fanduct_h/2); | 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); | 226 | translate([0,-nozzles_apart/2,-fanduct_elevation-fanduct_blowtarget]) sphere(d=.1); |
227 | } | 227 | } |
228 | translate([0,0,epsilon]) hull() for(my=[0:1]) mirror([0,my,0]) for(s=dual_spots) translate(s) | 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); | 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]) | 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); | 231 | rotate([0,0,45]) cylinder(r=hotend_clearance,h=fanduct_h+2*fanduct_shell+2,$fn=4); |
232 | } | 232 | } |
233 | }else if(what=="out") { | 233 | }else if(what=="out") { |
234 | hulls() { | 234 | hulls() { |
235 | translate([0,0,fanduct_shell]) cylinder(d=fanduct_w,h=fanduct_h/2-fanduct_shell/2); | 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); | 236 | translate([0,-nozzles_apart/2,-fanduct_elevation+fanduct_blowtarget]) sphere(d=.1); |
237 | } | 237 | } |
238 | }else if(what=="airguides") { | 238 | }else if(what=="airguides") { |
239 | far = fanduct_ir+fanduct_shell+fanduct_w; | 239 | far = fanduct_ir+fanduct_shell+fanduct_w; |
240 | near = fanduct_ir; | 240 | near = fanduct_ir; |
241 | union() { | 241 | union() { |
242 | for(my=[0,1]) mirror([0,my,0]) { | 242 | for(my=[0,1]) mirror([0,my,0]) { |
243 | guideline([ [-far ,0], [0,0] ]); | 243 | guideline([ [-far ,0], [0,0] ]); |
244 | guideline([ [-far ,inlet_w/2/4], | 244 | guideline([ [-far ,inlet_w/2/4], |
245 | [-near ,nozzles_apart/2] ]); | 245 | [-near ,nozzles_apart/2] ]); |
246 | guideline([ [-near-fanduct_w/3,nozzles_apart/2+near+fanduct_w/3] ]); | 246 | guideline([ [-near-fanduct_w/3,nozzles_apart/2+near+fanduct_w/3] ]); |
247 | guideline([ [0 ,nozzles_apart/2+near+fanduct_w/2] ]); | 247 | guideline([ [0 ,nozzles_apart/2+near+fanduct_w/2] ]); |
248 | } | 248 | } |
249 | } | 249 | } |
250 | } | 250 | } |
251 | } | 251 | } |
252 | 252 | ||
253 | if(dual) dual(what); | 253 | if(dual) dual(what); |
254 | else if(type=="circular") circus(what); | 254 | else if(type=="circular") circus(what); |
255 | else if(type=="3jets") jets(what); | 255 | else if(type=="3jets") jets(what); |
256 | } | 256 | } |
257 | 257 | ||
258 | // ***air intake | 258 | // ***air intake |
259 | module intake(what) { | 259 | module intake(what) { |
260 | module placeit() { | 260 | module placeit() { |
261 | translate([-fanduct_ir-2*fanduct_shell-fanduct_w-inlet_away,0,fanduct_shell]) | 261 | translate([-fanduct_ir-2*fanduct_shell-fanduct_w-inlet_away,0,fanduct_shell]) |
262 | rotate([0,-90,0]) | 262 | rotate([0,-90,0]) |
263 | children(); | 263 | children(); |
264 | } | 264 | } |
265 | if(what=="in") { | 265 | if(what=="in") { |
266 | placeit() translate([0,-inlet_w/2,0]) { | 266 | placeit() translate([0,-inlet_w/2,0]) { |
267 | difference() { | 267 | difference() { |
268 | cube(size=[inlet_h,inlet_w,inlet_long_l+fanduct_shell]); | 268 | cube(size=[inlet_h,inlet_w,inlet_long_l+fanduct_shell]); |
269 | translate([inlet_h+fanduct_shell,0,inlet_long_l+fanduct_shell]) | 269 | translate([inlet_h+fanduct_shell,0,inlet_long_l+fanduct_shell]) |
270 | rotate([-90,0,0]) | 270 | rotate([-90,0,0]) |
271 | translate([0,0,-1]) | 271 | translate([0,0,-1]) |
272 | cylinder(r=inlet_h,h=inlet_w+2*fanduct_shell+2,$fn=inlet_h*4); | 272 | cylinder(r=inlet_h,h=inlet_w+2*fanduct_shell+2,$fn=inlet_h*4); |
273 | } | 273 | } |
274 | // supports | 274 | // supports |
275 | for(i=[-1,0,1]) | 275 | for(i=[-1,0,1]) |
276 | translate([-fanduct_shell, | 276 | translate([-fanduct_shell, |
277 | (i+1)*(inlet_w-extrusion_width)/2, | 277 | (i+1)*(inlet_w-extrusion_width)/2, |
278 | -inlet_away-fanduct_w/2]) | 278 | -inlet_away-fanduct_w/2]) |
279 | cube(size=[fanduct_shell, | 279 | cube(size=[fanduct_shell, |
280 | extrusion_width, | 280 | extrusion_width, |
281 | inlet_long_l+fanduct_shell+inlet_away+fanduct_w/2]); | 281 | inlet_long_l+fanduct_shell+inlet_away+fanduct_w/2]); |
282 | } | 282 | } |
283 | hull() { | 283 | hull() { |
284 | placeit() translate([-fanduct_shell,-inlet_w/2-fanduct_shell,0]) | 284 | placeit() translate([-fanduct_shell,-inlet_w/2-fanduct_shell,0]) |
285 | cube(size=[inlet_h+2*fanduct_shell,inlet_w+2*fanduct_shell,fanduct_shell]); | 285 | cube(size=[inlet_h+2*fanduct_shell,inlet_w+2*fanduct_shell,fanduct_shell]); |
286 | translate([-fanduct_ir-fanduct_shell-fanduct_w/2,0,0]) | 286 | translate([-fanduct_ir-fanduct_shell-fanduct_w/2,0,0]) |
287 | translate([0,-inlet_w/2-fanduct_shell/2,0]) | 287 | translate([0,-inlet_w/2-fanduct_shell/2,0]) |
288 | cube(size=[1,inlet_w+fanduct_shell,fanduct_shell*2+fanduct_h]); | 288 | cube(size=[1,inlet_w+fanduct_shell,fanduct_shell*2+fanduct_h]); |
289 | } | 289 | } |
290 | }else if(what=="out") { | 290 | }else if(what=="out") { |
291 | placeit() translate([fanduct_shell,-inlet_w/2+fanduct_shell,0]) | 291 | placeit() translate([fanduct_shell,-inlet_w/2+fanduct_shell,0]) |
292 | cube(size=[inlet_h-2*fanduct_shell,inlet_w-2*fanduct_shell,inlet_long_l+fanduct_shell+1]); | 292 | cube(size=[inlet_h-2*fanduct_shell,inlet_w-2*fanduct_shell,inlet_long_l+fanduct_shell+1]); |
293 | hull() { | 293 | hull() { |
294 | placeit() translate([fanduct_shell,-inlet_w/2+fanduct_shell,0]) | 294 | placeit() translate([fanduct_shell,-inlet_w/2+fanduct_shell,0]) |
295 | cube(size=[inlet_h-2*fanduct_shell,inlet_w-2*fanduct_shell,fanduct_shell]); | 295 | cube(size=[inlet_h-2*fanduct_shell,inlet_w-2*fanduct_shell,fanduct_shell]); |
296 | translate([-fanduct_ir-fanduct_shell-fanduct_w/2,0,fanduct_shell]) | 296 | translate([-fanduct_ir-fanduct_shell-fanduct_w/2,0,fanduct_shell]) |
297 | translate([0,-inlet_w/2+fanduct_shell,0]) | 297 | translate([0,-inlet_w/2+fanduct_shell,0]) |
298 | cube(size=[1,inlet_w-2*fanduct_shell,fanduct_h]); | 298 | cube(size=[1,inlet_w-2*fanduct_shell,fanduct_h]); |
299 | } | 299 | } |
300 | } | 300 | } |
301 | } | 301 | } |
302 | 302 | ||
303 | // ***DUCT TAILS!!! WOO-OO! (every day they're out there making duct tails…) | 303 | // ***DUCT TAILS!!! WOO-OO! (every day they're out there making duct tails…) |
304 | module tails(what) { | 304 | module tails(what) { |
305 | if(dual) { | 305 | if(dual) { |
306 | // XXX: not sure if it will ever be | 306 | // XXX: not sure if it will ever be |
307 | }else{ | 307 | }else{ |
308 | if(what=="in") { | 308 | if(what=="in") { |
309 | for(mx=[0,1]) mirror([mx,0,0]) | 309 | for(mx=[0,1]) mirror([mx,0,0]) |
310 | translate([fanduct_ir+fanduct_shell+fanduct_w/2,0,fanduct_shell+fanduct_h/2]) | 310 | translate([fanduct_ir+fanduct_shell+fanduct_w/2,0,fanduct_shell+fanduct_h/2]) |
311 | rotate([90,0,90]) | 311 | rotate([90,0,90]) |
312 | translate([0,0,-snapper_d/2]) | 312 | translate([0,0,-snapper_d/2]) |
313 | snapper(d=snapper_d,o=snapper_overlap,side=0,l=fanduct_h*3/2+fanduct_shell); | 313 | snapper(d=snapper_d,o=snapper_overlap,side=0,l=fanduct_h*3/2+fanduct_shell); |
314 | } | 314 | } |
315 | } | 315 | } |
316 | } | 316 | } |
317 | 317 | ||
318 | module parts(what) { | 318 | module parts(what) { |
319 | union() { | 319 | union() { |
320 | duct(what); | 320 | duct(what); |
321 | marks(what); | 321 | marks(what); |
322 | output(what); | 322 | output(what); |
323 | intake(what); | 323 | intake(what); |
324 | tails(what); | 324 | tails(what); |
325 | } | 325 | } |
326 | } | 326 | } |
327 | 327 | ||