-rw-r--r-- | fanduct.scad | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fanduct.scad b/fanduct.scad index da89aac..6407a96 100644 --- a/fanduct.scad +++ b/fanduct.scad | |||
@@ -1,128 +1,128 @@ | |||
1 | use <snapper.scad>; | 1 | use <snapper.scad>; |
2 | extrusion_width=.5; layer_height=.2; // print parameters | 2 | extrusion_width=.5; layer_height=.2; // print parameters |
3 | 3 | ||
4 | epsilon=.005; // for finer cuts | 4 | epsilon=.005; // for finer cuts |
5 | 5 | ||
6 | function hypothenuse(a,b) = sqrt(pow(a,2)+pow(b,2)); | 6 | function hypothenuse(a,b) = sqrt(pow(a,2)+pow(b,2)); |
7 | 7 | ||
8 | silicone_shell = 2; | 8 | silicone_shell = 2; |
9 | heater_clearance = max( | 9 | heater_clearance = max( |
10 | hypothenuse(16/2 +silicone_shell, 20-4.5 +silicone_shell),// E3D v6 | 10 | hypothenuse(16/2 +silicone_shell, 20-4.5 +silicone_shell),// E3D v6 |
11 | hypothenuse(11.5-4.5 +silicone_shell, 15.5 +silicone_shell)// E3D volcano | 11 | hypothenuse(11.5-4.5 +silicone_shell, 15.5 +silicone_shell)// E3D volcano |
12 | ); | 12 | ); |
13 | 13 | ||
14 | fanduct_elevation = 3; // fanduct elevation above nozzle tip | 14 | fanduct_elevation = 3; // fanduct elevation above nozzle tip |
15 | fanduct_blowtarget = -2; // what to blow at | 15 | fanduct_blowtarget = -2; // what to blow at |
16 | fanduct_h = 6; // inner height of the duct | 16 | fanduct_h = 6; // inner height of the duct |
17 | fanduct_w = 7; // inner width of the duct | 17 | fanduct_w = 7; // inner width of the duct |
18 | fanduct_shell=1.2; // shell thickness | 18 | fanduct_shell=1.2; // shell thickness |
19 | fanduct_ir = heater_clearance+5; // inner radius | 19 | fanduct_ir = heater_clearance+5; // inner radius |
20 | 20 | ||
21 | jet_angle = 60-2; // angular width of the jet | 21 | jet_angle = 60-2; // angular width of the jet |
22 | 22 | ||
23 | inlet_w = 12.5; // inlet width | 23 | inlet_w = 12.5; // inlet width |
24 | inlet_h = 17; // inlet height | 24 | inlet_h = 17; // inlet height |
25 | inlet_short_l = 7;// inlet length of protrusion (or depth of intrusion:)) | 25 | inlet_short_l = 7;// inlet length of protrusion (or depth of intrusion:)) |
26 | inlet_away = 15;// how far away inlet is | 26 | inlet_away = 15;// how far away inlet is |
27 | 27 | ||
28 | inlet_long_l = inlet_short_l+inlet_h; | 28 | inlet_long_l = inlet_short_l+inlet_h; |
29 | hotend_clearance = heater_clearance; | 29 | hotend_clearance = heater_clearance; |
30 | 30 | ||
31 | nozzles_apart = 18; // distance between nozzles for dual hotend | 31 | nozzles_apart = 18; // distance between nozzles for dual hotend |
32 | space_behind_nozzle = 15;// space behind the nozzle where we're allowed to go | 32 | space_behind_nozzle = 10;// space behind the nozzle where we're allowed to go |
33 | // without the fear of hitting carriage | 33 | // without the fear of hitting carriage |
34 | 34 | ||
35 | snapper_d = 8; snapper_overlap=0.2;// snip snap | 35 | snapper_d = 8; snapper_overlap=0.2;// snip snap |
36 | 36 | ||
37 | smooth_f = 120; | 37 | smooth_f = 120; |
38 | 38 | ||
39 | type="circular"; // circular|3jets | 39 | type="circular"; // circular|3jets |
40 | ductshape="square"; // square|round | 40 | ductshape="square"; // square|round |
41 | dual=false; // dual or single | 41 | dual=false; // dual or single |
42 | 42 | ||
43 | to_midduct = fanduct_ir+fanduct_shell+fanduct_w/2; | 43 | to_midduct = fanduct_ir+fanduct_shell+fanduct_w/2; |
44 | dual_spots = [ [+space_behind_nozzle, -(to_midduct+nozzles_apart/2)], | 44 | dual_spots = [ [+space_behind_nozzle, -(to_midduct+nozzles_apart/2)], |
45 | [- to_midduct, -(to_midduct+nozzles_apart/2)], | 45 | [- to_midduct, -(to_midduct+nozzles_apart/2)], |
46 | [- to_midduct, 0] ]; | 46 | [- to_midduct, 0] ]; |
47 | 47 | ||
48 | module fanduct(type=type,ductshape=ductshape,dual=dual) { | 48 | module fanduct(type=type,ductshape=ductshape,dual=dual) { |
49 | // ***duct is all around! | 49 | // ***duct is all around! |
50 | module duct(what) { | 50 | module duct(what) { |
51 | module single() { | 51 | module single() { |
52 | if(what=="in") { | 52 | if(what=="in") { |
53 | sh = fanduct_w+2*fanduct_shell; sv = fanduct_h+2*fanduct_shell; | 53 | sh = fanduct_w+2*fanduct_shell; sv = fanduct_h+2*fanduct_shell; |
54 | smax = max(sh,sv); | 54 | smax = max(sh,sv); |
55 | rotate_extrude($fn=smooth_f) | 55 | rotate_extrude($fn=smooth_f) |
56 | if(ductshape=="round") | 56 | if(ductshape=="round") |
57 | translate([sh/2+fanduct_ir,sv/2]) | 57 | translate([sh/2+fanduct_ir,sv/2]) |
58 | scale([sh/smax,sv/smax]) | 58 | scale([sh/smax,sv/smax]) |
59 | circle(d=smax,$fn=4*smax); | 59 | circle(d=smax,$fn=4*smax); |
60 | else if(ductshape=="square") | 60 | else if(ductshape=="square") |
61 | translate([fanduct_ir,0]) | 61 | translate([fanduct_ir,0]) |
62 | square([sh,sv]); | 62 | square([sh,sv]); |
63 | }else if(what=="out") { | 63 | }else if(what=="out") { |
64 | sh = fanduct_w; sv = fanduct_h; | 64 | sh = fanduct_w; sv = fanduct_h; |
65 | smax = max(sh,sv); | 65 | smax = max(sh,sv); |
66 | rotate_extrude($fn=smooth_f) | 66 | rotate_extrude($fn=smooth_f) |
67 | if(ductshape=="round") | 67 | if(ductshape=="round") |
68 | translate([sh/2+fanduct_shell+fanduct_ir,sv/2+fanduct_shell]) | 68 | translate([sh/2+fanduct_shell+fanduct_ir,sv/2+fanduct_shell]) |
69 | scale([sh/smax,sv/smax]) | 69 | scale([sh/smax,sv/smax]) |
70 | circle(d=smax,$fn=4*smax); | 70 | circle(d=smax,$fn=4*smax); |
71 | else if(ductshape=="square") | 71 | else if(ductshape=="square") |
72 | translate([fanduct_ir+fanduct_shell,fanduct_shell]) | 72 | translate([fanduct_ir+fanduct_shell,fanduct_shell]) |
73 | union() { | 73 | union() { |
74 | square([sh,sv/2]); | 74 | square([sh,sv/2]); |
75 | translate([sh/2,sv/2]) | 75 | translate([sh/2,sv/2]) |
76 | scale([sh/smax,sv/smax]) | 76 | scale([sh/smax,sv/smax]) |
77 | circle(d=smax,$fn=36); | 77 | circle(d=smax,$fn=36); |
78 | } | 78 | } |
79 | } | 79 | } |
80 | } | 80 | } |
81 | module dual() { | 81 | module dual() { |
82 | module hulls(spots=dual_spots) { | 82 | module hulls(spots=dual_spots) { |
83 | for(my=[0,1]) mirror([0,my,0]) for(pn=[0:1:len(spots)-2]) hull() { | 83 | for(my=[0,1]) mirror([0,my,0]) for(pn=[0:1:len(spots)-2]) hull() { |
84 | for(p=[spots[pn],spots[pn+1]]) translate(p) children(); | 84 | for(p=[spots[pn],spots[pn+1]]) translate(p) children(); |
85 | } | 85 | } |
86 | } | 86 | } |
87 | if(what=="in") { | 87 | if(what=="in") { |
88 | hulls() cylinder(d=fanduct_w+2*fanduct_shell,h=fanduct_h+2*fanduct_shell); | 88 | hulls() cylinder(d=fanduct_w+2*fanduct_shell,h=fanduct_h+2*fanduct_shell); |
89 | }else if(what=="out") { | 89 | }else if(what=="out") { |
90 | sh = fanduct_w; sv = fanduct_h; | 90 | sh = fanduct_w; sv = fanduct_h; |
91 | smax = max(sh,sv); | 91 | smax = max(sh,sv); |
92 | translate([0,0,fanduct_shell]) hulls() { | 92 | translate([0,0,fanduct_shell]) hulls() { |
93 | cylinder(d=fanduct_w,h=fanduct_h/2); | 93 | cylinder(d=fanduct_w,h=fanduct_h/2); |
94 | translate([0,0,fanduct_h/2]) | 94 | translate([0,0,fanduct_h/2]) |
95 | scale([sh/smax,sh/smax,sv/smax]) | 95 | scale([sh/smax,sh/smax,sv/smax]) |
96 | intersection() { | 96 | intersection() { |
97 | sphere(d=smax,$fn=36); | 97 | sphere(d=smax,$fn=36); |
98 | translate([0,0,-1]) | 98 | translate([0,0,-1]) |
99 | cylinder(d=smax+2,h=smax+2,$fn=36); | 99 | cylinder(d=smax+2,h=smax+2,$fn=36); |
100 | } | 100 | } |
101 | } | 101 | } |
102 | } | 102 | } |
103 | } | 103 | } |
104 | 104 | ||
105 | if(dual) dual(); | 105 | if(dual) dual(); |
106 | else single(); | 106 | else single(); |
107 | } | 107 | } |
108 | 108 | ||
109 | // ***bumps for easier position adjustments in line with hotend | 109 | // ***bumps for easier position adjustments in line with hotend |
110 | module marks(what) { | 110 | module marks(what) { |
111 | if(what=="in") { | 111 | if(what=="in") { |
112 | for(y=[-1,1]) translate([0,dual?y*nozzles_apart/2:0,0]) | 112 | for(y=[-1,1]) translate([0,dual?y*nozzles_apart/2:0,0]) |
113 | hull() for(z=[0,-fanduct_shell-fanduct_h/2]) | 113 | hull() for(z=[0,-fanduct_shell-fanduct_h/2]) |
114 | translate([0,y*(fanduct_ir+fanduct_shell+fanduct_w/2),fanduct_shell*2+fanduct_h+z]) | 114 | translate([0,y*(fanduct_ir+fanduct_shell+fanduct_w/2),fanduct_shell*2+fanduct_h+z]) |
115 | rotate([90,0,0]) { | 115 | rotate([90,0,0]) { |
116 | cylinder(r=fanduct_shell,h=fanduct_w,center=true,$fn=30); | 116 | cylinder(r=fanduct_shell,h=fanduct_w,center=true,$fn=30); |
117 | for(z=[-1,1]) translate([0,0,z*fanduct_w/2]) | 117 | for(z=[-1,1]) translate([0,0,z*fanduct_w/2]) |
118 | sphere(r=fanduct_shell,$fn=30); | 118 | sphere(r=fanduct_shell,$fn=30); |
119 | } | 119 | } |
120 | } | 120 | } |
121 | } | 121 | } |
122 | 122 | ||
123 | // ***output | 123 | // ***output |
124 | module output(what,type=type) { | 124 | module output(what,type=type) { |
125 | module guideline(xyxy) { | 125 | module guideline(xyxy) { |
126 | module pin(xy) { | 126 | module pin(xy) { |
127 | translate([xy[0],xy[1],0]) | 127 | translate([xy[0],xy[1],0]) |
128 | cylinder(d=2*extrusion_width,h=2*fanduct_shell+inlet_h,$fn=6); | 128 | cylinder(d=2*extrusion_width,h=2*fanduct_shell+inlet_h,$fn=6); |