-rw-r--r-- | fanduct.scad | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/fanduct.scad b/fanduct.scad index fa14b7a..75a3bb1 100644 --- a/fanduct.scad +++ b/fanduct.scad | |||
@@ -95,115 +95,115 @@ module fanduct(type=type,ductshape=ductshape) { | |||
95 | hull() for(j=[i,i+1]) pin(xyxyxy[j]); | 95 | hull() for(j=[i,i+1]) pin(xyxyxy[j]); |
96 | } | 96 | } |
97 | 97 | ||
98 | module circus(what) { | 98 | module circus(what) { |
99 | if(what=="in") { | 99 | if(what=="in") { |
100 | difference() { | 100 | difference() { |
101 | rotate_extrude($fn=smooth_f) | 101 | rotate_extrude($fn=smooth_f) |
102 | polygon([ | 102 | polygon([ |
103 | [0,-fanduct_elevation+fanduct_blowtarget+epsilon], | 103 | [0,-fanduct_elevation+fanduct_blowtarget+epsilon], |
104 | [fanduct_ir+fanduct_shell,fanduct_shell+fanduct_h/2], | 104 | [fanduct_ir+fanduct_shell,fanduct_shell+fanduct_h/2], |
105 | [fanduct_ir+fanduct_shell+fanduct_w/2,0], | 105 | [fanduct_ir+fanduct_shell+fanduct_w/2,0], |
106 | [0,-fanduct_elevation+fanduct_blowtarget-epsilon]]); | 106 | [0,-fanduct_elevation+fanduct_blowtarget-epsilon]]); |
107 | translate([0,0,-1]) | 107 | translate([0,0,-1]) |
108 | cylinder(r=hotend_clearance,h=fanduct_h+2*fanduct_shell+2,$fn=smooth_f); | 108 | cylinder(r=hotend_clearance,h=fanduct_h+2*fanduct_shell+2,$fn=smooth_f); |
109 | mirror([0,0,1]) | 109 | mirror([0,0,1]) |
110 | translate([0,0,-epsilon]) | 110 | translate([0,0,-epsilon]) |
111 | cylinder(r=fanduct_ir+fanduct_shell+1,h=fanduct_elevation+.1+2); | 111 | cylinder(r=fanduct_ir+fanduct_shell+1,h=fanduct_elevation+.1+2); |
112 | } | 112 | } |
113 | }else if(what=="out") { | 113 | }else if(what=="out") { |
114 | rotate_extrude($fn=smooth_f) | 114 | rotate_extrude($fn=smooth_f) |
115 | polygon([ | 115 | polygon([ |
116 | [0,-fanduct_elevation+fanduct_blowtarget+epsilon], | 116 | [0,-fanduct_elevation+fanduct_blowtarget+epsilon], |
117 | [fanduct_ir+fanduct_shell+1,fanduct_h/2], | 117 | [fanduct_ir+fanduct_shell+1,fanduct_h/2], |
118 | [fanduct_ir+fanduct_w/2+fanduct_shell+1,fanduct_shell], | 118 | [fanduct_ir+fanduct_w/2+fanduct_shell+1,fanduct_shell], |
119 | [0,-fanduct_elevation+fanduct_blowtarget-epsilon]]); | 119 | [0,-fanduct_elevation+fanduct_blowtarget-epsilon]]); |
120 | }else if(what=="airguides") { | 120 | }else if(what=="airguides") { |
121 | inr = fanduct_ir+fanduct_shell; our = inr+fanduct_w; | 121 | inr = fanduct_ir+fanduct_shell; our = inr+fanduct_w; |
122 | union() { | 122 | union() { |
123 | for(my=[0,1]) mirror([0,my,0]) { | 123 | for(my=[0,1]) mirror([0,my,0]) { |
124 | guideline([ | 124 | guideline([ |
125 | [-our,inlet_w/6], | 125 | [-our,inlet_w/6], |
126 | [-inr*sin(60),inr*cos(60)] | 126 | [-inr*sin(60),inr*cos(60)] |
127 | ]); | 127 | ]); |
128 | a0=30; as=15; a1=180; | 128 | a0=30; as=15; a1=180; |
129 | for(a=[a0+as:as:a1]) { | 129 | for(a=[a0+as:as:a1]) { |
130 | f = as/(a1-a+as); | 130 | f = as/(a1-a+as); |
131 | rotate([0,0,a]) guideline([[-inr-fanduct_w*f,0]]); | 131 | rotate([0,0,a]) guideline([[-inr-fanduct_w*f,0]]); |
132 | } | 132 | } |
133 | guideline([ | 133 | guideline([ |
134 | [-our+fanduct_w*cos(30)*3/4,fanduct_w*sin(30)*3/4], | 134 | [-our+fanduct_w*cos(30)*3/4,fanduct_w*sin(30)*3/4], |
135 | [-inr*cos(10),inr*sin(10)] | 135 | [-inr*cos(10),inr*sin(10)] |
136 | ]); | 136 | ]); |
137 | } | 137 | } |
138 | }/*union*/ | 138 | }/*union*/ |
139 | }/*airguides*/ | 139 | }/*airguides*/ |
140 | } | 140 | } |
141 | 141 | ||
142 | module jets(what) { | 142 | module jets(what) { |
143 | od = fanduct_h/2+fanduct_shell; | 143 | od = fanduct_h*2/3+fanduct_shell; |
144 | md = fanduct_ir+fanduct_shell+fanduct_w/2; | 144 | md = fanduct_ir+fanduct_shell+fanduct_w/2; |
145 | jww = 2*md*sin(jet_angle/2); | 145 | jww = 2*md*sin(jet_angle/2); |
146 | render(convexity=8) difference() { | 146 | difference() { |
147 | for(a=[0:120:359]) rotate([0,0,a]) { | 147 | for(a=[0:120:359]) rotate([0,0,a]) { |
148 | if(what=="in") { | 148 | if(what=="in") { |
149 | hull() { | 149 | hull() { |
150 | render(convexity=4) intersection() { | 150 | intersection() { |
151 | translate([md-fanduct_shell-fanduct_w/2,-jww/2,0]) | 151 | translate([md-fanduct_w/2,-jww/2,0]) |
152 | cube(size=[fanduct_shell+fanduct_w/2,jww,od]); | 152 | cube(size=[fanduct_shell+fanduct_w/2,jww,od]); |
153 | duct(what=what); | 153 | duct(what=what); |
154 | } | 154 | } |
155 | translate([0,0,-fanduct_elevation]) sphere(r=.5); | 155 | translate([0,0,-fanduct_elevation]) sphere(r=.5); |
156 | } | 156 | } |
157 | }else if(what=="out") { | 157 | }else if(what=="out") { |
158 | hull() { | 158 | hull() { |
159 | render(convexity=4) intersection() { | 159 | intersection() { |
160 | translate([md-fanduct_w/2-fanduct_shell,-jww/2+fanduct_shell,fanduct_shell]) | 160 | translate([md-fanduct_w/2,-jww/2+fanduct_shell,fanduct_shell]) |
161 | cube(size=[fanduct_w/2+fanduct_shell,jww-2*fanduct_shell,od-2*fanduct_shell]); | 161 | cube(size=[fanduct_w/2,jww-2*fanduct_shell,od-2*fanduct_shell]); |
162 | duct(what=what); | 162 | duct(what=what); |
163 | } | 163 | } |
164 | translate([0,0,-fanduct_elevation]) sphere(r=.2); | 164 | translate([0,0,-fanduct_elevation]) sphere(r=.2); |
165 | } | 165 | } |
166 | } | 166 | } |
167 | } | 167 | } |
168 | if(what=="in") { | 168 | if(what=="in") { |
169 | translate([0,0,-fanduct_elevation-2+epsilon]) | 169 | translate([0,0,-fanduct_elevation-2+epsilon]) |
170 | cylinder(r=fanduct_ir+fanduct_shell*2+fanduct_w+1,h=fanduct_elevation+2); | 170 | cylinder(r=fanduct_ir+fanduct_shell*2+fanduct_w+1,h=fanduct_elevation+2); |
171 | translate([0,0,-hotend_clearance]) | 171 | translate([0,0,-hotend_clearance]) |
172 | rotate([0,0,30]) | 172 | rotate([0,0,30]) |
173 | cylinder(r1=hotend_clearance*2,r2=0,h=hotend_clearance*2,$fn=6); | 173 | cylinder(r1=hotend_clearance*2,r2=0,h=hotend_clearance*2,$fn=6); |
174 | } | 174 | } |
175 | } | 175 | } |
176 | } | 176 | } |
177 | 177 | ||
178 | if(type=="circular") circus(what); | 178 | if(type=="circular") circus(what); |
179 | else if(type=="3jets") jets(what); | 179 | else if(type=="3jets") jets(what); |
180 | } | 180 | } |
181 | 181 | ||
182 | // ***air intake | 182 | // ***air intake |
183 | module intake(what) { | 183 | module intake(what) { |
184 | module placeit() { | 184 | module placeit() { |
185 | translate([-fanduct_ir-2*fanduct_shell-fanduct_w-inlet_away,0,fanduct_shell]) | 185 | translate([-fanduct_ir-2*fanduct_shell-fanduct_w-inlet_away,0,fanduct_shell]) |
186 | rotate([0,-90,0]) | 186 | rotate([0,-90,0]) |
187 | children(); | 187 | children(); |
188 | } | 188 | } |
189 | if(what=="in") { | 189 | if(what=="in") { |
190 | placeit() translate([0,-inlet_w/2,0]) { | 190 | placeit() translate([0,-inlet_w/2,0]) { |
191 | cube(size=[inlet_h,inlet_w,inlet_l+fanduct_shell]); | 191 | cube(size=[inlet_h,inlet_w,inlet_l+fanduct_shell]); |
192 | // supports | 192 | // supports |
193 | for(i=[-1,0,1]) | 193 | for(i=[-1,0,1]) |
194 | translate([-fanduct_shell, | 194 | translate([-fanduct_shell, |
195 | (i+1)*(inlet_w-extrusion_width)/2, | 195 | (i+1)*(inlet_w-extrusion_width)/2, |
196 | -inlet_away-fanduct_w/2]) | 196 | -inlet_away-fanduct_w/2]) |
197 | cube(size=[fanduct_shell, | 197 | cube(size=[fanduct_shell, |
198 | extrusion_width, | 198 | extrusion_width, |
199 | inlet_l+fanduct_shell+inlet_away+fanduct_w/2]); | 199 | inlet_l+fanduct_shell+inlet_away+fanduct_w/2]); |
200 | } | 200 | } |
201 | hull() { | 201 | hull() { |
202 | placeit() translate([-fanduct_shell,-inlet_w/2-fanduct_shell,0]) | 202 | placeit() translate([-fanduct_shell,-inlet_w/2-fanduct_shell,0]) |
203 | cube(size=[inlet_h+2*fanduct_shell,inlet_w+2*fanduct_shell,fanduct_shell]); | 203 | cube(size=[inlet_h+2*fanduct_shell,inlet_w+2*fanduct_shell,fanduct_shell]); |
204 | translate([-fanduct_ir-fanduct_shell-fanduct_w/2,0,0]) | 204 | translate([-fanduct_ir-fanduct_shell-fanduct_w/2,0,0]) |
205 | translate([0,-inlet_w/2-fanduct_shell/2,0]) | 205 | translate([0,-inlet_w/2-fanduct_shell/2,0]) |
206 | cube(size=[1,inlet_w+fanduct_shell,fanduct_shell*2+fanduct_h]); | 206 | cube(size=[1,inlet_w+fanduct_shell,fanduct_shell*2+fanduct_h]); |
207 | } | 207 | } |
208 | }else if(what=="out") { | 208 | }else if(what=="out") { |
209 | placeit() translate([fanduct_shell,-inlet_w/2+fanduct_shell,0]) | 209 | placeit() translate([fanduct_shell,-inlet_w/2+fanduct_shell,0]) |