summaryrefslogtreecommitdiffabout
authorMichael Krelin <hacker@klever.net>2016-06-13 19:51:08 (UTC)
committer Michael Krelin <hacker@klever.net>2016-06-13 19:51:08 (UTC)
commit6129dba8296f318d9791769bbeb9304ba43f3d98 (patch) (unidiff)
treeaaa6d0bd7e9e8eb889f5298d99e6386a61dafc62
parentc1cf1db2fe6d4bb3450f6f94e806eca04955be3b (diff)
downloadfanductory-6129dba8296f318d9791769bbeb9304ba43f3d98.zip
fanductory-6129dba8296f318d9791769bbeb9304ba43f3d98.tar.gz
fanductory-6129dba8296f318d9791769bbeb9304ba43f3d98.tar.bz2
make support overlap with supported
otherwise slic3r fails to properly bridge
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--fanduct.scad2
1 files changed, 1 insertions, 1 deletions
diff --git a/fanduct.scad b/fanduct.scad
index 49ab4c2..302ea07 100644
--- a/fanduct.scad
+++ b/fanduct.scad
@@ -184,178 +184,178 @@ module fanduct(type=type,ductshape=ductshape,dual=dual) {
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 cfn= 4; // clearance cutout $fn 223 cfn= 4; // clearance cutout $fn
224 difference() { 224 difference() {
225 hulls() { 225 hulls() {
226 cylinder(d=fanduct_w+2*fanduct_shell,h=2*fanduct_shell+fanduct_h/2); 226 cylinder(d=fanduct_w+2*fanduct_shell,h=2*fanduct_shell+fanduct_h/2);
227 translate([0,-nozzles_apart/2,-fanduct_elevation-fanduct_blowtarget]) sphere(d=.1); 227 translate([0,-nozzles_apart/2,-fanduct_elevation-fanduct_blowtarget]) sphere(d=.1);
228 } 228 }
229 translate([0,0,epsilon]) hull() for(my=[0:1]) mirror([0,my,0]) for(s=dual_spots) translate(s) 229 translate([0,0,epsilon]) hull() for(my=[0:1]) mirror([0,my,0]) for(s=dual_spots) translate(s)
230 mirror([0,0,1]) cylinder(d=fanduct_w+2*fanduct_shell+2,h=fanduct_elevation-fanduct_blowtarget+1); 230 mirror([0,0,1]) cylinder(d=fanduct_w+2*fanduct_shell+2,h=fanduct_elevation-fanduct_blowtarget+1);
231 for(s=[-1,1]) translate([0,s*nozzles_apart/2,-1]) 231 for(s=[-1,1]) translate([0,s*nozzles_apart/2,-1])
232 rotate([0,0,180/cfn]) cylinder(r=hotend_clearance/cos(180/cfn),h=fanduct_h+2*fanduct_shell+2,$fn=cfn); 232 rotate([0,0,180/cfn]) cylinder(r=hotend_clearance/cos(180/cfn),h=fanduct_h+2*fanduct_shell+2,$fn=cfn);
233 } 233 }
234 }else if(what=="out") { 234 }else if(what=="out") {
235 hulls() { 235 hulls() {
236 translate([0,0,fanduct_shell]) cylinder(d=fanduct_w,h=fanduct_h/2-fanduct_shell/2); 236 translate([0,0,fanduct_shell]) cylinder(d=fanduct_w,h=fanduct_h/2-fanduct_shell/2);
237 translate([0,-nozzles_apart/2,-fanduct_elevation+fanduct_blowtarget]) sphere(d=.1); 237 translate([0,-nozzles_apart/2,-fanduct_elevation+fanduct_blowtarget]) sphere(d=.1);
238 } 238 }
239 }else if(what=="airguides") { 239 }else if(what=="airguides") {
240 far = fanduct_ir+fanduct_shell+fanduct_w; 240 far = fanduct_ir+fanduct_shell+fanduct_w;
241 near = fanduct_ir; 241 near = fanduct_ir;
242 union() { 242 union() {
243 for(my=[0,1]) mirror([0,my,0]) { 243 for(my=[0,1]) mirror([0,my,0]) {
244 guideline([ [-far ,0], [0,0] ]); 244 guideline([ [-far ,0], [0,0] ]);
245 guideline([ [-far ,inlet_w/2/4], 245 guideline([ [-far ,inlet_w/2/4],
246 [-near ,nozzles_apart/2] ]); 246 [-near ,nozzles_apart/2] ]);
247 guideline([ [-near-fanduct_w/3,nozzles_apart/2+near+fanduct_w/3] ]); 247 guideline([ [-near-fanduct_w/3,nozzles_apart/2+near+fanduct_w/3] ]);
248 guideline([ [0 ,nozzles_apart/2+near+fanduct_w/2] ]); 248 guideline([ [0 ,nozzles_apart/2+near+fanduct_w/2] ]);
249 } 249 }
250 } 250 }
251 } 251 }
252 } 252 }
253 253
254 if(dual) dual(what); 254 if(dual) dual(what);
255 else if(type=="circular") circus(what); 255 else if(type=="circular") circus(what);
256 else if(type=="3jets") jets(what); 256 else if(type=="3jets") jets(what);
257 } 257 }
258 258
259 // ***air intake 259 // ***air intake
260 module intake(what) { 260 module intake(what) {
261 module placeit() { 261 module placeit() {
262 translate([-fanduct_ir-2*fanduct_shell-fanduct_w-inlet_away,0,fanduct_shell]) 262 translate([-fanduct_ir-2*fanduct_shell-fanduct_w-inlet_away,0,fanduct_shell])
263 rotate([0,-90,0]) 263 rotate([0,-90,0])
264 children(); 264 children();
265 } 265 }
266 if(what=="in") { 266 if(what=="in") {
267 placeit() translate([0,-inlet_w/2,0]) { 267 placeit() translate([0,-inlet_w/2,0]) {
268 difference() { 268 difference() {
269 cube(size=[inlet_h,inlet_w,inlet_long_l+fanduct_shell]); 269 cube(size=[inlet_h,inlet_w,inlet_long_l+fanduct_shell]);
270 translate([inlet_h+fanduct_shell,0,inlet_long_l+fanduct_shell]) 270 translate([inlet_h+fanduct_shell,0,inlet_long_l+fanduct_shell])
271 rotate([-90,0,0]) 271 rotate([-90,0,0])
272 translate([0,0,-1]) 272 translate([0,0,-1])
273 cylinder(r=inlet_h,h=inlet_w+2*fanduct_shell+2,$fn=inlet_h*4); 273 cylinder(r=inlet_h,h=inlet_w+2*fanduct_shell+2,$fn=inlet_h*4);
274 } 274 }
275 // supports 275 // supports
276 for(i=[-1,0,1]) 276 for(i=[-1,0,1])
277 translate([-fanduct_shell, 277 translate([-fanduct_shell,
278 (i+1)*(inlet_w-extrusion_width)/2, 278 (i+1)*(inlet_w-extrusion_width)/2,
279 -inlet_away-fanduct_w/2]) 279 -inlet_away-fanduct_w/2])
280 cube(size=[fanduct_shell, 280 cube(size=[fanduct_shell+1,
281 extrusion_width, 281 extrusion_width,
282 inlet_long_l+fanduct_shell+inlet_away+fanduct_w/2]); 282 inlet_long_l+fanduct_shell+inlet_away+fanduct_w/2]);
283 } 283 }
284 hull() { 284 hull() {
285 placeit() translate([-fanduct_shell,-inlet_w/2-fanduct_shell,0]) 285 placeit() translate([-fanduct_shell,-inlet_w/2-fanduct_shell,0])
286 cube(size=[inlet_h+2*fanduct_shell,inlet_w+2*fanduct_shell,fanduct_shell]); 286 cube(size=[inlet_h+2*fanduct_shell,inlet_w+2*fanduct_shell,fanduct_shell]);
287 translate([-fanduct_ir-fanduct_shell-fanduct_w/2,0,0]) 287 translate([-fanduct_ir-fanduct_shell-fanduct_w/2,0,0])
288 translate([0,-inlet_w/2-fanduct_shell/2,0]) 288 translate([0,-inlet_w/2-fanduct_shell/2,0])
289 cube(size=[1,inlet_w+fanduct_shell,fanduct_shell*2+fanduct_h]); 289 cube(size=[1,inlet_w+fanduct_shell,fanduct_shell*2+fanduct_h]);
290 } 290 }
291 }else if(what=="out") { 291 }else if(what=="out") {
292 placeit() translate([fanduct_shell,-inlet_w/2+fanduct_shell,0]) 292 placeit() translate([fanduct_shell,-inlet_w/2+fanduct_shell,0])
293 cube(size=[inlet_h-2*fanduct_shell,inlet_w-2*fanduct_shell,inlet_long_l+fanduct_shell+1]); 293 cube(size=[inlet_h-2*fanduct_shell,inlet_w-2*fanduct_shell,inlet_long_l+fanduct_shell+1]);
294 hull() { 294 hull() {
295 placeit() translate([fanduct_shell,-inlet_w/2+fanduct_shell,0]) 295 placeit() translate([fanduct_shell,-inlet_w/2+fanduct_shell,0])
296 cube(size=[inlet_h-2*fanduct_shell,inlet_w-2*fanduct_shell,fanduct_shell]); 296 cube(size=[inlet_h-2*fanduct_shell,inlet_w-2*fanduct_shell,fanduct_shell]);
297 translate([-fanduct_ir-fanduct_shell-fanduct_w/2,0,fanduct_shell]) 297 translate([-fanduct_ir-fanduct_shell-fanduct_w/2,0,fanduct_shell])
298 translate([0,-inlet_w/2+fanduct_shell,0]) 298 translate([0,-inlet_w/2+fanduct_shell,0])
299 cube(size=[1,inlet_w-2*fanduct_shell,fanduct_h]); 299 cube(size=[1,inlet_w-2*fanduct_shell,fanduct_h]);
300 } 300 }
301 } 301 }
302 } 302 }
303 303
304 // ***DUCT TAILS!!! WOO-OO! (every day they're out there making duct tails…) 304 // ***DUCT TAILS!!! WOO-OO! (every day they're out there making duct tails…)
305 module tails(what) { 305 module tails(what) {
306 if(dual) { 306 if(dual) {
307 // XXX: not sure if it will ever be 307 // XXX: not sure if it will ever be
308 }else{ 308 }else{
309 if(what=="in") { 309 if(what=="in") {
310 for(mx=[0,1]) mirror([mx,0,0]) 310 for(mx=[0,1]) mirror([mx,0,0])
311 translate([fanduct_ir+fanduct_shell+fanduct_w/2,0,fanduct_shell+fanduct_h/2]) 311 translate([fanduct_ir+fanduct_shell+fanduct_w/2,0,fanduct_shell+fanduct_h/2])
312 rotate([90,0,90]) 312 rotate([90,0,90])
313 translate([0,0,-snapper_d/2]) 313 translate([0,0,-snapper_d/2])
314 snapper(d=snapper_d,o=snapper_overlap,side=0,l=fanduct_h*3/2+fanduct_shell); 314 snapper(d=snapper_d,o=snapper_overlap,side=0,l=fanduct_h*3/2+fanduct_shell);
315 } 315 }
316 } 316 }
317 } 317 }
318 318
319 module parts(what) { 319 module parts(what) {
320 union() { 320 union() {
321 duct(what); 321 duct(what);
322 marks(what); 322 marks(what);
323 output(what); 323 output(what);
324 intake(what); 324 intake(what);
325 tails(what); 325 tails(what);
326 } 326 }
327 } 327 }
328 328
329 difference() { 329 difference() {
330 parts("in"); 330 parts("in");
331 parts("out"); 331 parts("out");
332 } 332 }
333 intersection() { 333 intersection() {
334 union() { 334 union() {
335 output("airguides"); 335 output("airguides");
336 sphere(d=epsilon); 336 sphere(d=epsilon);
337 } 337 }
338 union() { 338 union() {
339 duct("in"); output("in"); intake("in"); 339 duct("in"); output("in"); intake("in");
340 } 340 }
341 } 341 }
342} 342}
343 343
344view="*"; // hcut|vcut|* 344view="*"; // hcut|vcut|*
345 345
346hinfinity=4*(fanduct_ir+fanduct_shell*2+fanduct_w+inlet_away); 346hinfinity=4*(fanduct_ir+fanduct_shell*2+fanduct_w+inlet_away);
347vinfinity=2*(fanduct_shell*2+fanduct_h+inlet_h); 347vinfinity=2*(fanduct_shell*2+fanduct_h+inlet_h);
348if(view=="hcut") { 348if(view=="hcut") {
349 difference() { 349 difference() {
350 fanduct(); 350 fanduct();
351 translate([-hinfinity/2,-hinfinity/2,fanduct_shell+fanduct_h/2]) 351 translate([-hinfinity/2,-hinfinity/2,fanduct_shell+fanduct_h/2])
352 cube(size=[hinfinity,hinfinity,vinfinity]); 352 cube(size=[hinfinity,hinfinity,vinfinity]);
353 } 353 }
354}else if(view=="vcut") { 354}else if(view=="vcut") {
355 difference() { 355 difference() {
356 fanduct(); 356 fanduct();
357 translate([-hinfinity/2,0,-vinfinity/2]) 357 translate([-hinfinity/2,0,-vinfinity/2])
358 cube(size=[hinfinity,hinfinity,vinfinity]); 358 cube(size=[hinfinity,hinfinity,vinfinity]);
359 } 359 }
360}else fanduct(); 360}else fanduct();
361/* vim:set sw=1 ai: */ 361/* vim:set sw=1 ai: */