-rw-r--r-- | fanduct.scad | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fanduct.scad b/fanduct.scad index 235c079..e16c5ae 100644 --- a/fanduct.scad +++ b/fanduct.scad | |||
@@ -30,49 +30,51 @@ type="3jets"; // "3jets" ; // circular|3jets | |||
30 | 30 | ||
31 | 31 | ||
32 | module fanduct(type=type) { | 32 | module fanduct(type=type) { |
33 | 33 | ||
34 | // ***duct is all around! | 34 | // ***duct is all around! |
35 | module duct(what) { | 35 | module duct(what) { |
36 | if(what=="in") { | 36 | if(what=="in") { |
37 | rotate_extrude($fn=smooth_f) | 37 | rotate_extrude($fn=smooth_f) |
38 | translate([fanduct_ir,0]) | 38 | translate([fanduct_ir,0]) |
39 | square([fanduct_w+2*fanduct_shell,fanduct_h+2*fanduct_shell]); | 39 | square([fanduct_w+2*fanduct_shell,fanduct_h+2*fanduct_shell]); |
40 | }else if(what=="out") { | 40 | }else if(what=="out") { |
41 | rotate_extrude($fn=smooth_f) | 41 | rotate_extrude($fn=smooth_f) |
42 | translate([fanduct_ir+fanduct_shell,fanduct_shell]) | 42 | translate([fanduct_ir+fanduct_shell,fanduct_shell]) |
43 | union() { | 43 | union() { |
44 | square([fanduct_w,fanduct_h/2]); | 44 | square([fanduct_w,fanduct_h/2]); |
45 | translate([fanduct_w/2,fanduct_h-fanduct_w/2]) | 45 | translate([fanduct_w/2,fanduct_h-fanduct_w/2]) |
46 | rotate([0,0,90]) circle(d=fanduct_w,$fn=36); | 46 | rotate([0,0,90]) circle(d=fanduct_w,$fn=36); |
47 | } | 47 | } |
48 | } | 48 | } |
49 | } | 49 | } |
50 | 50 | ||
51 | // ***bumps for easier position adjustments in line with hotend | 51 | // ***bumps for easier position adjustments in line with hotend |
52 | module marks(what) { | 52 | module marks(what) { |
53 | if(what=="in") { | 53 | if(what=="in") { |
54 | for(y=[-1,1]) translate([0,y*(fanduct_ir+fanduct_shell+fanduct_w/2),fanduct_shell*2+fanduct_h]) | 54 | for(y=[-1,1]) |
55 | hull() for(z=[0,-fanduct_shell-fanduct_h/2]) | ||
56 | translate([0,y*(fanduct_ir+fanduct_shell+fanduct_w/2),fanduct_shell*2+fanduct_h+z]) | ||
55 | rotate([90,0,0]) { | 57 | rotate([90,0,0]) { |
56 | cylinder(r=fanduct_shell,h=fanduct_w,center=true,$fn=30); | 58 | cylinder(r=fanduct_shell,h=fanduct_w,center=true,$fn=30); |
57 | for(z=[-1,1]) translate([0,0,z*fanduct_w/2]) | 59 | for(z=[-1,1]) translate([0,0,z*fanduct_w/2]) |
58 | sphere(r=fanduct_shell,$fn=30); | 60 | sphere(r=fanduct_shell,$fn=30); |
59 | } | 61 | } |
60 | } | 62 | } |
61 | } | 63 | } |
62 | 64 | ||
63 | // ***output | 65 | // ***output |
64 | module output(what,type=type) { | 66 | module output(what,type=type) { |
65 | module guideline(xyxy) { | 67 | module guideline(xyxy) { |
66 | module pin(xy) { | 68 | module pin(xy) { |
67 | translate([xy[0],xy[1],0]) | 69 | translate([xy[0],xy[1],0]) |
68 | cylinder(d=2*extrusion_width,h=2*fanduct_shell+inlet_h,$fn=6); | 70 | cylinder(d=2*extrusion_width,h=2*fanduct_shell+inlet_h,$fn=6); |
69 | } | 71 | } |
70 | xyxyxy=concat(xyxy,[[0,0]]); | 72 | xyxyxy=concat(xyxy,[[0,0]]); |
71 | for(i=[0:1:len(xyxyxy)-2]) | 73 | for(i=[0:1:len(xyxyxy)-2]) |
72 | hull() for(j=[i,i+1]) pin(xyxyxy[j]); | 74 | hull() for(j=[i,i+1]) pin(xyxyxy[j]); |
73 | } | 75 | } |
74 | 76 | ||
75 | module circus(what) { | 77 | module circus(what) { |
76 | if(what=="in") { | 78 | if(what=="in") { |
77 | difference() { | 79 | difference() { |
78 | rotate_extrude($fn=smooth_f) | 80 | rotate_extrude($fn=smooth_f) |