-rw-r--r-- | another.scad | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/another.scad b/another.scad index 461dc26..74a2d5f 100644 --- a/another.scad +++ b/another.scad | |||
@@ -132,196 +132,198 @@ module the_extruder( | |||
132 | hh=sqrt(pow(r,2)-pow(d,2)/4); | 132 | hh=sqrt(pow(r,2)-pow(d,2)/4); |
133 | translate([0,0,hh]) sphere(r=r,$fn=fnr*r); | 133 | translate([0,0,hh]) sphere(r=r,$fn=fnr*r); |
134 | } | 134 | } |
135 | } | 135 | } |
136 | 136 | ||
137 | % if(vitamins) mirrorleft() { | 137 | % if(vitamins) mirrorleft() { |
138 | translate([0,0,-epsilon]) mirror([0,0,1]) cylinder(d=gearbox_d,h=1,$fn=60); | 138 | translate([0,0,-epsilon]) mirror([0,0,1]) cylinder(d=gearbox_d,h=1,$fn=60); |
139 | for(zr=[0:90:359]) rotate([0,0,zr]) translate([mount_d/2,0,0]) | 139 | for(zr=[0:90:359]) rotate([0,0,zr]) translate([mount_d/2,0,0]) |
140 | cylinder(d=mount_screw_d,h=20,$fn=30); | 140 | cylinder(d=mount_screw_d,h=20,$fn=30); |
141 | translate([0,0,-epsilon]) cylinder(d=protrusion_d,h=protrusion_h,$fn=30); | 141 | translate([0,0,-epsilon]) cylinder(d=protrusion_d,h=protrusion_h,$fn=30); |
142 | translate([0,0,protrusion_h]) { | 142 | translate([0,0,protrusion_h]) { |
143 | difference() { | 143 | difference() { |
144 | cylinder(d=bore_d,h=bore_l,$fn=30); | 144 | cylinder(d=bore_d,h=bore_l,$fn=30); |
145 | translate([-bore_d/2-1,bore_dd-bore_d/2,-1]) | 145 | translate([-bore_d/2-1,bore_dd-bore_d/2,-1]) |
146 | cube([bore_d+2,bore_d/2,bore_l+2]); | 146 | cube([bore_d+2,bore_d/2,bore_l+2]); |
147 | } | 147 | } |
148 | translate([0,0,pulley_elevation]) { | 148 | translate([0,0,pulley_elevation]) { |
149 | cylinder(d=pulley_d,h=pulley_h,$fn=30); | 149 | cylinder(d=pulley_d,h=pulley_h,$fn=30); |
150 | translate([0,0,teeth_elevation]) { | 150 | translate([0,0,teeth_elevation]) { |
151 | place_idler() { | 151 | place_idler() { |
152 | cylinder(d=idler_d,h=idler_h,center=true,$fn=30); | 152 | cylinder(d=idler_d,h=idler_h,center=true,$fn=30); |
153 | cylinder(d=idler_screw_d,h=lever_thickness+2,center=true,$fn=30); | 153 | cylinder(d=idler_screw_d,h=lever_thickness+2,center=true,$fn=30); |
154 | }//place idler | 154 | }//place idler |
155 | // filament path | 155 | // filament path |
156 | rotate([0,0,45]) { | 156 | rotate([0,0,45]) { |
157 | translate([pulley_d/2-idler_filament_offset,0,0]) rotate([90,0,0]) { | 157 | translate([pulley_d/2-idler_filament_offset,0,0]) rotate([90,0,0]) { |
158 | cylinder(d=filament_d,h=gearbox_d,center=false,$fn=15); | 158 | cylinder(d=filament_d,h=gearbox_d,center=false,$fn=15); |
159 | }//rotate translate | 159 | }//rotate translate |
160 | translate([pulley_d/2+filament_offset,0,0]) rotate([-90,0,0]) { | 160 | translate([pulley_d/2+filament_offset,0,0]) rotate([-90,0,0]) { |
161 | cylinder(d=filament_d,h=gearbox_d,center=false,$fn=15); | 161 | cylinder(d=filament_d,h=gearbox_d,center=false,$fn=15); |
162 | translate([0,0,mount_d/sqrt(2)/2+mount_screw_d]) | 162 | translate([0,0,mount_d/sqrt(2)/2+mount_screw_d]) |
163 | pushfit(pf); | 163 | pushfit(pf); |
164 | }//rotate translate | 164 | }//rotate translate |
165 | }//rotate | 165 | }//rotate |
166 | }//translate teeth | 166 | }//translate teeth |
167 | }//translate pulley | 167 | }//translate pulley |
168 | }//translate protrusion | 168 | }//translate protrusion |
169 | }//vitamins | 169 | }//vitamins |
170 | 170 | ||
171 | module lever() { | 171 | module lever() { |
172 | translate([0,0,protrusion_h+pulley_elevation+teeth_elevation]) { | 172 | translate([0,0,protrusion_h+pulley_elevation+teeth_elevation]) { |
173 | difference() { | 173 | difference() { |
174 | union() { | 174 | union() { |
175 | hull() { | 175 | hull() { |
176 | place_idler() | 176 | place_idler() |
177 | cylinder(d=lsd,h=lever_thickness,center=true,$fn=60); | 177 | cylinder(d=lsd,h=lever_thickness,center=true,$fn=60); |
178 | translate([mount_d/2,0,0]) | 178 | translate([mount_d/2,0,0]) |
179 | cylinder(d=lsd,h=lever_thickness,center=true,$fn=60); | 179 | cylinder(d=lsd,h=lever_thickness,center=true,$fn=60); |
180 | }//hull | 180 | }//hull |
181 | hull() { | 181 | hull() { |
182 | translate([mount_d/2,0,0]) | 182 | translate([mount_d/2,0,0]) |
183 | cylinder(d=lsd,h=lever_thickness,center=true,$fn=60); | 183 | cylinder(d=lsd,h=lever_thickness,center=true,$fn=60); |
184 | translate([mount_d/2,-longwing,0]) rotate([0,90,0]) | 184 | translate([mount_d/2,-longwing,0]) rotate([0,90,0]) |
185 | cylinder(d=lever_thickness,h=lsd,center=true,$fn=60); | 185 | cylinder(d=lever_thickness,h=lsd,center=true,$fn=60); |
186 | }//hull | 186 | }//hull |
187 | }//union | 187 | }//union |
188 | 188 | ||
189 | // filament path | 189 | // filament path |
190 | place_idler() | 190 | place_idler() |
191 | translate([-idler_d/2-idler_filament_offset,0,0]) | 191 | translate([-idler_d/2-idler_filament_offset,0,0]) |
192 | rotate([90,0,0]) { | 192 | rotate([90,0,0]) { |
193 | mirror([0,1,0]) | 193 | mirror([0,1,0]) |
194 | teardrop(d=filament_path_d,h=3*gearbox_d,center=true); | 194 | teardrop(d=filament_path_d,h=3*gearbox_d,center=true); |
195 | translate([0,0, | 195 | translate([0,0, |
196 | sqrt(2)*(mount_d-pulley_d+lsd)/2 | 196 | sqrt(2)*(mount_d-pulley_d+lsd)/2 |
197 | ]) { | 197 | ]) { |
198 | cylinder(d1=filament_path_d,d2=2*filament_path_d, | 198 | cylinder(d1=filament_path_d,d2=2*filament_path_d, |
199 | h=filament_path_d,$fn=2*filament_path_d*fnd); | 199 | h=filament_path_d,$fn=2*filament_path_d*fnd); |
200 | translate([0,0,filament_path_d-epsilon]) | 200 | translate([0,0,filament_path_d-epsilon]) |
201 | cylinder(d=2*filament_path_d,h=lsd*sqrt(2),$fn=2*filament_path_d*fnd); | 201 | cylinder(d=2*filament_path_d,h=lsd*sqrt(2),$fn=2*filament_path_d*fnd); |
202 | }//translate | 202 | }//translate |
203 | }//rotate translate place_idler | 203 | }//rotate translate place_idler |
204 | 204 | ||
205 | // idler space and mounting hole | 205 | // idler space and mounting hole |
206 | place_idler() { | 206 | place_idler() { |
207 | cylinder(d=idler_d+idler_clearance*2,h=idler_h+idler_v_tolerance,center=true,$fn=60); | 207 | cylinder(d=idler_d+idler_clearance*2,h=idler_h+idler_v_tolerance,center=true,$fn=60); |
208 | cylinder(d=idler_screw_d,h=lever_thickness+2,center=true,$fn=30); | 208 | cylinder(d=idler_screw_d,h=lever_thickness+2,center=true,$fn=30); |
209 | translate([0,0,lever_thickness/2-idler_screwhead_h]) | 209 | translate([0,0,lever_thickness/2-idler_screwhead_h]) |
210 | cylinder(d=idler_screwhead_d,h=idler_screwhead_h+1,$fn=fnd*idler_screwhead_d); | 210 | cylinder(d=idler_screwhead_d,h=idler_screwhead_h+1,$fn=fnd*idler_screwhead_d); |
211 | } | 211 | } |
212 | // mounting screw hole | 212 | // mounting screw hole |
213 | translate([mount_d/2,0,0]) | 213 | translate([mount_d/2,0,0]) |
214 | cylinder(d=mount_screw_d+mount_screw_d_tolerance,h=lever_thickness+2,center=true,$fn=fnd*mount_screw_d); | 214 | cylinder(d=mount_screw_d+mount_screw_d_tolerance,h=lever_thickness+2,center=true,$fn=fnd*mount_screw_d); |
215 | 215 | ||
216 | // lever end | 216 | // lever end |
217 | translate([mount_d/2,0,0]) rotate([0,90,0]) { | 217 | translate([mount_d/2,0,0]) rotate([0,90,0]) { |
218 | translate([0,-longwing,lsd/2]) finger_indent(d=lever_thickness-1,r=15); | 218 | translate([0,-longwing,lsd/2]) finger_indent(d=lever_thickness-1,r=15); |
219 | translate([0,-longwing,0]) | 219 | translate([0,-longwing,0]) |
220 | mirror([0,0,1]) | 220 | mirror([0,0,1]) |
221 | difference() { | 221 | difference() { |
222 | cylinder(d=spring_d+spring_d_clearance,h=lsd,$fn=fnd*(spring_d+spring_d_clearance)); | 222 | cylinder(d=spring_d+spring_d_clearance,h=lsd,$fn=fnd*(spring_d+spring_d_clearance)); |
223 | sphere(d=spring_d*3/4,$fn=fnd*spring_d*3/4); | 223 | sphere(d=spring_d*3/4,$fn=fnd*spring_d*3/4); |
224 | } | 224 | } |
225 | }//rotate-translate | 225 | }//rotate-translate |
226 | }//difference | 226 | }//difference |
227 | // bridging patch | 227 | // bridging patch |
228 | if(bridges) place_idler() | 228 | if(bridges) place_idler() { |
229 | translate([0,0,lever_thickness/2-mount_screwhead_h]) | 229 | translate([0,0,lever_thickness/2-mount_screwhead_h]) |
230 | mirror([0,0,1]) | 230 | mirror([0,0,1]) cylinder(d=mount_screwhead_d,h=layer_height); |
231 | cylinder(d=mount_screwhead_d,h=layer_height); | 231 | translate([0,0,-(idler_h+idler_v_tolerance)/2]) |
232 | mirror([0,0,1]) cylinder(d=mount_screwhead_d,h=layer_height); | ||
233 | } | ||
232 | }//translate | 234 | }//translate |
233 | }//lever module | 235 | }//lever module |
234 | 236 | ||
235 | module body() { | 237 | module body() { |
236 | difference() { | 238 | difference() { |
237 | union() { | 239 | union() { |
238 | cylinder(d=gearbox_d,h=body_h,$fn=fnd*gearbox_d); | 240 | cylinder(d=gearbox_d,h=body_h,$fn=fnd*gearbox_d); |
239 | // spring tensioner part | 241 | // spring tensioner part |
240 | translate([-gearbox_d/2,0,0]) hull() { | 242 | translate([-gearbox_d/2,0,0]) hull() { |
241 | translate([0,-longwing,ls_z]) | 243 | translate([0,-longwing,ls_z]) |
242 | rotate([0,90,0]) | 244 | rotate([0,90,0]) |
243 | cylinder(d=lever_thickness,h=fsw,$fn=fnd*lever_thickness); | 245 | cylinder(d=lever_thickness,h=fsw,$fn=fnd*lever_thickness); |
244 | hh=body_h-ls_z; | 246 | hh=body_h-ls_z; |
245 | translate([0,0,ls_z]) | 247 | translate([0,0,ls_z]) |
246 | mirror([0,1,0]) cube(size=[fsw,longwing+(st_split_w+st_split_w_tolerance)/2+st_thickshell,body_h-ls_z]); | 248 | mirror([0,1,0]) cube(size=[fsw,longwing+(st_split_w+st_split_w_tolerance)/2+st_thickshell,body_h-ls_z]); |
247 | hhh=ls_z; | 249 | hhh=ls_z; |
248 | translate([0,0,0]) | 250 | translate([0,0,0]) |
249 | mirror([0,1,0]) cube(size=[fsw,longwing-hhh+lever_thickness/sqrt(2),hhh+lever_thickness/2]); | 251 | mirror([0,1,0]) cube(size=[fsw,longwing-hhh+lever_thickness/sqrt(2),hhh+lever_thickness/2]); |
250 | }//hull translate | 252 | }//hull translate |
251 | 253 | ||
252 | // pushfit bracket | 254 | // pushfit bracket |
253 | translate([0,0,filament_elevation]) | 255 | translate([0,0,filament_elevation]) |
254 | rotate([0,0,45]) translate([pulley_d/2+filament_offset,0,0]) | 256 | rotate([0,0,45]) translate([pulley_d/2+filament_offset,0,0]) |
255 | rotate([-90,0,0]) | 257 | rotate([-90,0,0]) |
256 | translate([0,0,mount_d/sqrt(2)/2+mount_screw_d-gearbox_d/2/*TODO:*/]) { | 258 | translate([0,0,mount_d/sqrt(2)/2+mount_screw_d-gearbox_d/2/*TODO:*/]) { |
257 | pfbl = pf_h(pf)+gearbox_d/2; //TODO: | 259 | pfbl = pf_h(pf)+gearbox_d/2; //TODO: |
258 | if(pf_smooth) { | 260 | if(pf_smooth) { |
259 | pfbd = pf_d(pf)+2*pf_shell; | 261 | pfbd = pf_d(pf)+2*pf_shell; |
260 | hull() { | 262 | hull() { |
261 | cylinder(d=pfbd,h=pfbl,$fn=pfbd*fnd); | 263 | cylinder(d=pfbd,h=pfbl,$fn=pfbd*fnd); |
262 | translate([-epsilon/2,0,0]) { | 264 | translate([-epsilon/2,0,0]) { |
263 | cube(size=[epsilon,filament_elevation,pfbl-filament_elevation+pfbd/2]); | 265 | cube(size=[epsilon,filament_elevation,pfbl-filament_elevation+pfbd/2]); |
264 | mirror([0,1,0]) | 266 | mirror([0,1,0]) |
265 | cube(size=[epsilon,body_h-filament_elevation,pfbl-body_h+filament_elevation+pfbd/2]); | 267 | cube(size=[epsilon,body_h-filament_elevation,pfbl-body_h+filament_elevation+pfbd/2]); |
266 | }//translate | 268 | }//translate |
267 | }//hull | 269 | }//hull |
268 | }else{ | 270 | }else{ |
269 | pfb2a = pf_d(pf)+2*pf_shell; pfba = pfb2a/2; | 271 | pfb2a = pf_d(pf)+2*pf_shell; pfba = pfb2a/2; |
270 | pfbd = pfb2a/cos(30); | 272 | pfbd = pfb2a/cos(30); |
271 | pfbs = pfb2a*tan(30); | 273 | pfbs = pfb2a*tan(30); |
272 | cylinder(d=pfbd,h=pfbl,$fn=6); | 274 | cylinder(d=pfbd,h=pfbl,$fn=6); |
273 | translate([-pfbs/2,0,0]) { | 275 | translate([-pfbs/2,0,0]) { |
274 | hull() { | 276 | hull() { |
275 | translate([0,-pfba,0]) cube(size=[pfbs,pfb2a,pfbl]); | 277 | translate([0,-pfba,0]) cube(size=[pfbs,pfb2a,pfbl]); |
276 | cube(size=[pfbs,filament_elevation,pfbl-filament_elevation+pfba]); | 278 | cube(size=[pfbs,filament_elevation,pfbl-filament_elevation+pfba]); |
277 | mirror([0,1,0]) | 279 | mirror([0,1,0]) |
278 | cube(size=[pfbs,body_h-filament_elevation,pfbl-body_h+filament_elevation+pfba]); | 280 | cube(size=[pfbs,body_h-filament_elevation,pfbl-body_h+filament_elevation+pfba]); |
279 | }//hull | 281 | }//hull |
280 | }//translate*/ | 282 | }//translate*/ |
281 | }//if(pf_smooth) | 283 | }//if(pf_smooth) |
282 | }//translate rotate translate rotate translate | 284 | }//translate rotate translate rotate translate |
283 | }//union (first child of difference) | 285 | }//union (first child of difference) |
284 | 286 | ||
285 | // protrusion | 287 | // protrusion |
286 | translate([0,0,-1]) | 288 | translate([0,0,-1]) |
287 | cylinder(d=protrusion_d+protrusion_tolerance_h,h=protrusion_h+protrusion_tolerance_v+1,$fn=fnd*(protrusion_d+protrusion_tolerance_h)); | 289 | cylinder(d=protrusion_d+protrusion_tolerance_h,h=protrusion_h+protrusion_tolerance_v+1,$fn=fnd*(protrusion_d+protrusion_tolerance_h)); |
288 | // mount screw holes | 290 | // mount screw holes |
289 | for(zr=[0:90:359]) rotate([0,0,zr]) translate([mount_d/2,0,0]) { | 291 | for(zr=[0:90:359]) rotate([0,0,zr]) translate([mount_d/2,0,0]) { |
290 | translate([0,0,mount_screw_l-mount_depth-(bridges?layer_height:-epsilon)]) | 292 | translate([0,0,mount_screw_l-mount_depth-(bridges?layer_height:-epsilon)]) |
291 | mirror([0,0,1]) | 293 | mirror([0,0,1]) |
292 | cylinder(d=mount_screw_d+mount_screw_d_tolerance, | 294 | cylinder(d=mount_screw_d+mount_screw_d_tolerance, |
293 | h=mount_screw_l-mount_depth+1, | 295 | h=mount_screw_l-mount_depth+1, |
294 | $fn=fnd*(mount_screw_d+mount_screw_d_tolerance)); | 296 | $fn=fnd*(mount_screw_d+mount_screw_d_tolerance)); |
295 | translate([0,0,mount_screw_l-mount_depth]) | 297 | translate([0,0,mount_screw_l-mount_depth]) |
296 | cylinder(d=mount_screwhead_d,h=body_h+1,$fn=fnd*mount_screwhead_d); | 298 | cylinder(d=mount_screwhead_d,h=body_h+1,$fn=fnd*mount_screwhead_d); |
297 | }//for | 299 | }//for |
298 | // pushfit | 300 | // pushfit |
299 | pf_offset = mount_d/sqrt(2)/2+mount_screw_d; | 301 | pf_offset = mount_d/sqrt(2)/2+mount_screw_d; |
300 | translate([0,0,filament_elevation]) | 302 | translate([0,0,filament_elevation]) |
301 | rotate([0,0,45]) translate([pulley_d/2+filament_offset,0,0]) | 303 | rotate([0,0,45]) translate([pulley_d/2+filament_offset,0,0]) |
302 | rotate([-90,0,0]) | 304 | rotate([-90,0,0]) |
303 | translate([0,0,pf_offset]) | 305 | translate([0,0,pf_offset]) |
304 | rotate([0,0,180]) { | 306 | rotate([0,0,180]) { |
305 | pushfit(pf); | 307 | pushfit(pf); |
306 | mirror([0,0,1]) { | 308 | mirror([0,0,1]) { |
307 | fh = 1.5* (filament_guide_d-filament_path_d)/2; | 309 | fh = 1.5* (filament_guide_d-filament_path_d)/2; |
308 | fo = pf_offset -filament_path_d /*(idler_d+idler_clearance)/2*/-fh; | 310 | fo = pf_offset -filament_path_d /*(idler_d+idler_clearance)/2*/-fh; |
309 | translate([0,0,-1]) teardrop(d=filament_guide_d,h=fo/2,angle=225); | 311 | translate([0,0,-1]) teardrop(d=filament_guide_d,h=fo/2,angle=225); |
310 | translate([0,0,-1]) teardrop(d=filament_path_d,h=gearbox_d/2+1,angle=-225); | 312 | translate([0,0,-1]) teardrop(d=filament_path_d,h=gearbox_d/2+1,angle=-225); |
311 | translate([0,0,fo+epsilon]) | 313 | translate([0,0,fo+epsilon]) |
312 | cylinder(d1=filament_path_d,d2=filament_guide_d,h=fh,$fn=fnd*filament_guide_d); | 314 | cylinder(d1=filament_path_d,d2=filament_guide_d,h=fh,$fn=fnd*filament_guide_d); |
313 | }//mirror | 315 | }//mirror |
314 | }//rotate translate rotate translate rotate translate | 316 | }//rotate translate rotate translate rotate translate |
315 | // pulley | 317 | // pulley |
316 | cylinder(d=pulley_d+pulley_small_d_clearance,h=body_h+1,$fn=fnd*(pulley_d+pulley_d_clearance)); | 318 | cylinder(d=pulley_d+pulley_small_d_clearance,h=body_h+1,$fn=fnd*(pulley_d+pulley_d_clearance)); |
317 | cylinder(d=pulley_d+pulley_d_clearance,ls_z-max(idler_h,filament_guide_d)/2,$fn=fnd*(pulley_d+pulley_d_clearance)); | 319 | cylinder(d=pulley_d+pulley_d_clearance,ls_z-max(idler_h,filament_guide_d)/2,$fn=fnd*(pulley_d+pulley_d_clearance)); |
318 | 320 | ||
319 | translate([0,0,ls_z-ls_h/2]) { | 321 | translate([0,0,ls_z-ls_h/2]) { |
320 | // idler travel | 322 | // idler travel |
321 | translate([mount_d/2,0,0]) | 323 | translate([mount_d/2,0,0]) |
322 | rotate([0,0,45]) | 324 | rotate([0,0,45]) |
323 | rotate_extrude(angle=90,$fn=fnr*(shortwing+(idler_d+idler_clearance)/2)) | 325 | rotate_extrude(angle=90,$fn=fnr*(shortwing+(idler_d+idler_clearance)/2)) |
324 | square([shortwing+(idler_d+idler_clearance)/2,ls_h]); | 326 | square([shortwing+(idler_d+idler_clearance)/2,ls_h]); |
325 | // idler itself | 327 | // idler itself |
326 | place_idler() | 328 | place_idler() |
327 | cylinder(d=idler_d+idler_clearance,h=ls_h,$fn=fnd*(idler_d+idler_clearance)); | 329 | cylinder(d=idler_d+idler_clearance,h=ls_h,$fn=fnd*(idler_d+idler_clearance)); |