author | Michael Krelin <hacker@klever.net> | 2016-05-29 21:07:24 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2016-05-29 21:07:24 (UTC) |
commit | 477b5dff0c93243b93f03e51bca541b465b6f1f5 (patch) (unidiff) | |
tree | 83d0a43327d4579cc96ddbd45e663409bbe2c310 | |
parent | b4f3e3d54ad273a0dcf5bf3734ba1b37a57954d3 (diff) | |
download | fanductory-477b5dff0c93243b93f03e51bca541b465b6f1f5.zip fanductory-477b5dff0c93243b93f03e51bca541b465b6f1f5.tar.gz fanductory-477b5dff0c93243b93f03e51bca541b465b6f1f5.tar.bz2 |
stray assignment resigned
-rw-r--r-- | fanduct.scad | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/fanduct.scad b/fanduct.scad index a60609e..235c079 100644 --- a/fanduct.scad +++ b/fanduct.scad | |||
@@ -44,194 +44,192 @@ module fanduct(type=type) { | |||
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]) translate([0,y*(fanduct_ir+fanduct_shell+fanduct_w/2),fanduct_shell*2+fanduct_h]) |
55 | rotate([90,0,0]) { | 55 | rotate([90,0,0]) { |
56 | cylinder(r=fanduct_shell,h=fanduct_w,center=true,$fn=30); | 56 | cylinder(r=fanduct_shell,h=fanduct_w,center=true,$fn=30); |
57 | for(z=[-1,1]) translate([0,0,z*fanduct_w/2]) | 57 | for(z=[-1,1]) translate([0,0,z*fanduct_w/2]) |
58 | sphere(r=fanduct_shell,$fn=30); | 58 | sphere(r=fanduct_shell,$fn=30); |
59 | } | 59 | } |
60 | } | 60 | } |
61 | } | 61 | } |
62 | 62 | ||
63 | // ***output | 63 | // ***output |
64 | module output(what,type=type) { | 64 | module output(what,type=type) { |
65 | module guideline(xyxy) { | 65 | module guideline(xyxy) { |
66 | module pin(xy) { | 66 | module pin(xy) { |
67 | translate([xy[0],xy[1],0]) | 67 | translate([xy[0],xy[1],0]) |
68 | cylinder(d=2*extrusion_width,h=2*fanduct_shell+inlet_h,$fn=6); | 68 | cylinder(d=2*extrusion_width,h=2*fanduct_shell+inlet_h,$fn=6); |
69 | } | 69 | } |
70 | xyxyxy=concat(xyxy,[[0,0]]); | 70 | xyxyxy=concat(xyxy,[[0,0]]); |
71 | for(i=[0:1:len(xyxyxy)-2]) | 71 | for(i=[0:1:len(xyxyxy)-2]) |
72 | hull() for(j=[i,i+1]) pin(xyxyxy[j]); | 72 | hull() for(j=[i,i+1]) pin(xyxyxy[j]); |
73 | } | 73 | } |
74 | 74 | ||
75 | module circus(what) { | 75 | module circus(what) { |
76 | if(what=="in") { | 76 | if(what=="in") { |
77 | difference() { | 77 | difference() { |
78 | rotate_extrude($fn=smooth_f) | 78 | rotate_extrude($fn=smooth_f) |
79 | polygon([ | 79 | polygon([ |
80 | [0,-fanduct_elevation], | 80 | [0,-fanduct_elevation], |
81 | [fanduct_ir+fanduct_shell,fanduct_shell+fanduct_h/2], | 81 | [fanduct_ir+fanduct_shell,fanduct_shell+fanduct_h/2], |
82 | [fanduct_ir+fanduct_shell,0], | 82 | [fanduct_ir+fanduct_shell,0], |
83 | [0,-fanduct_elevation-.1]]); | 83 | [0,-fanduct_elevation-.1]]); |
84 | translate([0,0,-1]) | 84 | translate([0,0,-1]) |
85 | cylinder(r=hotend_clearance,h=fanduct_h+2*fanduct_shell+2,$fn=smooth_f); | 85 | cylinder(r=hotend_clearance,h=fanduct_h+2*fanduct_shell+2,$fn=smooth_f); |
86 | mirror([0,0,1]) | 86 | mirror([0,0,1]) |
87 | translate([0,0,-epsilon]) | 87 | translate([0,0,-epsilon]) |
88 | cylinder(r=fanduct_ir+fanduct_shell+1,h=fanduct_elevation+.1+2); | 88 | cylinder(r=fanduct_ir+fanduct_shell+1,h=fanduct_elevation+.1+2); |
89 | } | 89 | } |
90 | }else if(what=="out") { | 90 | }else if(what=="out") { |
91 | difference() { | 91 | difference() { |
92 | rotate_extrude($fn=smooth_f) | 92 | rotate_extrude($fn=smooth_f) |
93 | polygon([ | 93 | polygon([ |
94 | [0,-fanduct_elevation], | 94 | [0,-fanduct_elevation], |
95 | [fanduct_ir+fanduct_shell+1,fanduct_h/2], | 95 | [fanduct_ir+fanduct_shell+1,fanduct_h/2], |
96 | [fanduct_ir+fanduct_shell+1,fanduct_shell], | 96 | [fanduct_ir+fanduct_shell+1,fanduct_shell], |
97 | [0,-fanduct_elevation-.1]]); | 97 | [0,-fanduct_elevation-.1]]); |
98 | circus("airguides"); | 98 | circus("airguides"); |
99 | } | 99 | } |
100 | }else if(what=="airguides") { | 100 | }else if(what=="airguides") { |
101 | inr = fanduct_ir+fanduct_shell; our = inr+fanduct_w; | 101 | inr = fanduct_ir+fanduct_shell; our = inr+fanduct_w; |
102 | union() { | 102 | union() { |
103 | for(my=[0,1]) mirror([0,my,0]) { | 103 | for(my=[0,1]) mirror([0,my,0]) { |
104 | guideline([ | 104 | guideline([ |
105 | [-our,inlet_w/6], | 105 | [-our,inlet_w/6], |
106 | [-inr*sin(60),inr*cos(60)] | 106 | [-inr*sin(60),inr*cos(60)] |
107 | ]); | 107 | ]); |
108 | a0=30; as=15; a1=180; | 108 | a0=30; as=15; a1=180; |
109 | for(a=[a0+as:as:a1]) { | 109 | for(a=[a0+as:as:a1]) { |
110 | f = as/(a1-a+as); | 110 | f = as/(a1-a+as); |
111 | rotate([0,0,a]) guideline([[-inr-fanduct_w*f,0]]); | 111 | rotate([0,0,a]) guideline([[-inr-fanduct_w*f,0]]); |
112 | } | 112 | } |
113 | guideline([ | 113 | guideline([ |
114 | [-our+fanduct_w*cos(30)*3/4,fanduct_w*sin(30)*3/4], | 114 | [-our+fanduct_w*cos(30)*3/4,fanduct_w*sin(30)*3/4], |
115 | [-inr*cos(10),inr*sin(10)] | 115 | [-inr*cos(10),inr*sin(10)] |
116 | ]); | 116 | ]); |
117 | } | 117 | } |
118 | }/*union*/ | 118 | }/*union*/ |
119 | }/*airguides*/ | 119 | }/*airguides*/ |
120 | } | 120 | } |
121 | 121 | ||
122 | module jets(what) { | 122 | module jets(what) { |
123 | od = fanduct_h/2+fanduct_shell; | 123 | od = fanduct_h/2+fanduct_shell; |
124 | difference() { | 124 | difference() { |
125 | for(a=[0:120:359]) rotate([0,0,a]) { | 125 | for(a=[0:120:359]) rotate([0,0,a]) { |
126 | if(what=="in") { | 126 | if(what=="in") { |
127 | hull() { | 127 | hull() { |
128 | translate([fanduct_ir+od/2,0,od/2]) | 128 | translate([fanduct_ir+od/2,0,od/2]) |
129 | rotate([90,0,0]) | 129 | rotate([90,0,0]) |
130 | cylinder(d=od,h=2*(fanduct_ir+fanduct_shell+fanduct_w/2)*sin(jet_angle/2)-3,center=true,$fn=36); | 130 | cylinder(d=od,h=2*(fanduct_ir+fanduct_shell+fanduct_w/2)*sin(jet_angle/2)-3,center=true,$fn=36); |
131 | translate([0,0,-fanduct_elevation]) sphere(r=.5); | 131 | translate([0,0,-fanduct_elevation]) sphere(r=.5); |
132 | } | 132 | } |
133 | }else if(what=="out") { | 133 | }else if(what=="out") { |
134 | hull() { | 134 | hull() { |
135 | translate([fanduct_ir+od/2,0,od/2]) | 135 | translate([fanduct_ir+od/2,0,od/2]) |
136 | rotate([90,0,0]) | 136 | rotate([90,0,0]) |
137 | cylinder(d=od-2*fanduct_shell,h=2*(fanduct_ir+fanduct_shell+fanduct_w/2)*sin(jet_angle/2)-3-2*fanduct_shell,center=true); | 137 | cylinder(d=od-2*fanduct_shell,h=2*(fanduct_ir+fanduct_shell+fanduct_w/2)*sin(jet_angle/2)-3-2*fanduct_shell,center=true); |
138 | translate([0,0,-fanduct_elevation]) sphere(r=.2); | 138 | translate([0,0,-fanduct_elevation]) sphere(r=.2); |
139 | } | 139 | } |
140 | |||
141 | type="3jets"; | ||
142 | } | 140 | } |
143 | } | 141 | } |
144 | if(what=="in") { | 142 | if(what=="in") { |
145 | translate([0,0,-fanduct_elevation-2+epsilon]) | 143 | translate([0,0,-fanduct_elevation-2+epsilon]) |
146 | cylinder(r=fanduct_ir+fanduct_shell*2+fanduct_w+1,h=fanduct_elevation+2); | 144 | cylinder(r=fanduct_ir+fanduct_shell*2+fanduct_w+1,h=fanduct_elevation+2); |
147 | translate([0,0,-hotend_clearance]) | 145 | translate([0,0,-hotend_clearance]) |
148 | rotate([0,0,30]) | 146 | rotate([0,0,30]) |
149 | cylinder(r1=hotend_clearance*2,r2=0,h=hotend_clearance*2,$fn=6); | 147 | cylinder(r1=hotend_clearance*2,r2=0,h=hotend_clearance*2,$fn=6); |
150 | } | 148 | } |
151 | } | 149 | } |
152 | } | 150 | } |
153 | 151 | ||
154 | if(type=="circular") circus(what); | 152 | if(type=="circular") circus(what); |
155 | else if(type=="3jets") jets(what); | 153 | else if(type=="3jets") jets(what); |
156 | } | 154 | } |
157 | 155 | ||
158 | // ***air intake | 156 | // ***air intake |
159 | module intake(what) { | 157 | module intake(what) { |
160 | module placeit() { | 158 | module placeit() { |
161 | translate([-fanduct_ir-2*fanduct_shell-fanduct_w-inlet_away,0,fanduct_shell]) | 159 | translate([-fanduct_ir-2*fanduct_shell-fanduct_w-inlet_away,0,fanduct_shell]) |
162 | rotate([0,-90,0]) | 160 | rotate([0,-90,0]) |
163 | children(); | 161 | children(); |
164 | } | 162 | } |
165 | if(what=="in") { | 163 | if(what=="in") { |
166 | placeit() translate([0,-inlet_w/2,0]) { | 164 | placeit() translate([0,-inlet_w/2,0]) { |
167 | cube(size=[inlet_h,inlet_w,inlet_l+fanduct_shell]); | 165 | cube(size=[inlet_h,inlet_w,inlet_l+fanduct_shell]); |
168 | // supports | 166 | // supports |
169 | for(i=[-1,0,1]) | 167 | for(i=[-1,0,1]) |
170 | translate([-fanduct_shell, | 168 | translate([-fanduct_shell, |
171 | (i+1)*(inlet_w-extrusion_width)/2, | 169 | (i+1)*(inlet_w-extrusion_width)/2, |
172 | -inlet_away-fanduct_w/2]) | 170 | -inlet_away-fanduct_w/2]) |
173 | cube(size=[fanduct_shell, | 171 | cube(size=[fanduct_shell, |
174 | extrusion_width, | 172 | extrusion_width, |
175 | inlet_l+fanduct_shell+inlet_away+fanduct_w/2]); | 173 | inlet_l+fanduct_shell+inlet_away+fanduct_w/2]); |
176 | } | 174 | } |
177 | hull() { | 175 | hull() { |
178 | placeit() translate([-fanduct_shell,-inlet_w/2-fanduct_shell,0]) | 176 | placeit() translate([-fanduct_shell,-inlet_w/2-fanduct_shell,0]) |
179 | cube(size=[inlet_h+2*fanduct_shell,inlet_w+2*fanduct_shell,fanduct_shell]); | 177 | cube(size=[inlet_h+2*fanduct_shell,inlet_w+2*fanduct_shell,fanduct_shell]); |
180 | translate([-fanduct_ir-fanduct_shell-fanduct_w/2,0,0]) | 178 | translate([-fanduct_ir-fanduct_shell-fanduct_w/2,0,0]) |
181 | translate([0,-inlet_w/2-fanduct_shell/2,0]) | 179 | translate([0,-inlet_w/2-fanduct_shell/2,0]) |
182 | cube(size=[1,inlet_w+fanduct_shell,fanduct_shell*2+fanduct_h]); | 180 | cube(size=[1,inlet_w+fanduct_shell,fanduct_shell*2+fanduct_h]); |
183 | } | 181 | } |
184 | }else if(what=="out") { | 182 | }else if(what=="out") { |
185 | placeit() translate([fanduct_shell,-inlet_w/2+fanduct_shell,0]) | 183 | placeit() translate([fanduct_shell,-inlet_w/2+fanduct_shell,0]) |
186 | cube(size=[inlet_h-2*fanduct_shell,inlet_w-2*fanduct_shell,inlet_l+fanduct_shell+1]); | 184 | cube(size=[inlet_h-2*fanduct_shell,inlet_w-2*fanduct_shell,inlet_l+fanduct_shell+1]); |
187 | hull() { | 185 | hull() { |
188 | placeit() translate([fanduct_shell,-inlet_w/2+fanduct_shell,0]) | 186 | placeit() translate([fanduct_shell,-inlet_w/2+fanduct_shell,0]) |
189 | cube(size=[inlet_h-2*fanduct_shell,inlet_w-2*fanduct_shell,fanduct_shell]); | 187 | cube(size=[inlet_h-2*fanduct_shell,inlet_w-2*fanduct_shell,fanduct_shell]); |
190 | translate([-fanduct_ir-fanduct_shell-fanduct_w/2,0,fanduct_shell]) | 188 | translate([-fanduct_ir-fanduct_shell-fanduct_w/2,0,fanduct_shell]) |
191 | translate([0,-inlet_w/2,0]) | 189 | translate([0,-inlet_w/2,0]) |
192 | cube(size=[1,inlet_w,fanduct_h]); | 190 | cube(size=[1,inlet_w,fanduct_h]); |
193 | } | 191 | } |
194 | } | 192 | } |
195 | } | 193 | } |
196 | 194 | ||
197 | // ***DUCT TAILS!!! WOO-OO! (every day they're out there making duct tails…) | 195 | // ***DUCT TAILS!!! WOO-OO! (every day they're out there making duct tails…) |
198 | module tails(what) { | 196 | module tails(what) { |
199 | if(what=="in") { | 197 | if(what=="in") { |
200 | for(mx=[0,1]) mirror([mx,0,0]) | 198 | for(mx=[0,1]) mirror([mx,0,0]) |
201 | translate([fanduct_ir+fanduct_shell+fanduct_w/2,0,fanduct_shell+fanduct_h/2]) | 199 | translate([fanduct_ir+fanduct_shell+fanduct_w/2,0,fanduct_shell+fanduct_h/2]) |
202 | rotate([90,0,90]) | 200 | rotate([90,0,90]) |
203 | translate([0,0,-snapper_d/2]) | 201 | translate([0,0,-snapper_d/2]) |
204 | snapper(d=snapper_d,o=snapper_overlap,side=0,l=fanduct_h*3/2+fanduct_shell); | 202 | snapper(d=snapper_d,o=snapper_overlap,side=0,l=fanduct_h*3/2+fanduct_shell); |
205 | } | 203 | } |
206 | } | 204 | } |
207 | 205 | ||
208 | module parts(what) { | 206 | module parts(what) { |
209 | union() { | 207 | union() { |
210 | duct(what); | 208 | duct(what); |
211 | marks(what); | 209 | marks(what); |
212 | output(what); | 210 | output(what); |
213 | intake(what); | 211 | intake(what); |
214 | tails(what); | 212 | tails(what); |
215 | } | 213 | } |
216 | } | 214 | } |
217 | 215 | ||
218 | difference() { | 216 | difference() { |
219 | parts("in"); | 217 | parts("in"); |
220 | parts("out"); | 218 | parts("out"); |
221 | } | 219 | } |
222 | 220 | ||
223 | } | 221 | } |
224 | 222 | ||
225 | view="full"; // hcut|vcut|* | 223 | view="full"; // hcut|vcut|* |
226 | 224 | ||
227 | hinfinity=4*(fanduct_ir+fanduct_shell*2+fanduct_w+inlet_away); | 225 | hinfinity=4*(fanduct_ir+fanduct_shell*2+fanduct_w+inlet_away); |
228 | vinfinity=2*(fanduct_shell*2+fanduct_h+inlet_h); | 226 | vinfinity=2*(fanduct_shell*2+fanduct_h+inlet_h); |
229 | if(view=="hcut") { | 227 | if(view=="hcut") { |
230 | difference() { | 228 | difference() { |
231 | fanduct(); | 229 | fanduct(); |
232 | translate([-hinfinity/2,-hinfinity/2,fanduct_shell+fanduct_h/2]) | 230 | translate([-hinfinity/2,-hinfinity/2,fanduct_shell+fanduct_h/2]) |
233 | cube(size=[hinfinity,hinfinity,vinfinity]); | 231 | cube(size=[hinfinity,hinfinity,vinfinity]); |
234 | } | 232 | } |
235 | }else if(view=="vcut") { | 233 | }else if(view=="vcut") { |
236 | difference() { | 234 | difference() { |
237 | fanduct(); | 235 | fanduct(); |