-rw-r--r-- | another.scad | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/another.scad b/another.scad index b2e6c74..2331003 100644 --- a/another.scad +++ b/another.scad | |||
@@ -232,193 +232,192 @@ module the_extruder( | |||
232 | }//lever module | 232 | }//lever module |
233 | 233 | ||
234 | module body() { | 234 | module body() { |
235 | difference() { | 235 | difference() { |
236 | union() { | 236 | union() { |
237 | cylinder(d=gearbox_d,h=body_h,$fn=fnd*gearbox_d); | 237 | cylinder(d=gearbox_d,h=body_h,$fn=fnd*gearbox_d); |
238 | // spring tensioner part | 238 | // spring tensioner part |
239 | translate([-gearbox_d/2,0,0]) hull() { | 239 | translate([-gearbox_d/2,0,0]) hull() { |
240 | translate([0,-longwing,ls_z]) | 240 | translate([0,-longwing,ls_z]) |
241 | rotate([0,90,0]) | 241 | rotate([0,90,0]) |
242 | cylinder(d=lever_thickness,h=fsw,$fn=fnd*lever_thickness); | 242 | cylinder(d=lever_thickness,h=fsw,$fn=fnd*lever_thickness); |
243 | hh=body_h-ls_z; | 243 | hh=body_h-ls_z; |
244 | translate([0,0,ls_z]) | 244 | translate([0,0,ls_z]) |
245 | mirror([0,1,0]) cube(size=[fsw,longwing+(st_thinshell+st_split_w_tolerance)/2+st_thickshell,body_h-ls_z]); | 245 | mirror([0,1,0]) cube(size=[fsw,longwing+(st_thinshell+st_split_w_tolerance)/2+st_thickshell,body_h-ls_z]); |
246 | hhh=ls_z; | 246 | hhh=ls_z; |
247 | translate([0,0,0]) | 247 | translate([0,0,0]) |
248 | mirror([0,1,0]) cube(size=[fsw,longwing-hhh+lever_thickness/sqrt(2),hhh+lever_thickness/2]); | 248 | mirror([0,1,0]) cube(size=[fsw,longwing-hhh+lever_thickness/sqrt(2),hhh+lever_thickness/2]); |
249 | }//hull translate | 249 | }//hull translate |
250 | 250 | ||
251 | // pushfit bracket | 251 | // pushfit bracket |
252 | translate([0,0,filament_elevation]) | 252 | translate([0,0,filament_elevation]) |
253 | rotate([0,0,45]) translate([pulley_d/2+filament_offset,0,0]) | 253 | rotate([0,0,45]) translate([pulley_d/2+filament_offset,0,0]) |
254 | rotate([-90,0,0]) | 254 | rotate([-90,0,0]) |
255 | translate([0,0,mount_d/sqrt(2)/2+mount_screw_d-gearbox_d/2/*TODO:*/]) { | 255 | translate([0,0,mount_d/sqrt(2)/2+mount_screw_d-gearbox_d/2/*TODO:*/]) { |
256 | pfbl = pf_h(pf)+gearbox_d/2; //TODO: | 256 | pfbl = pf_h(pf)+gearbox_d/2; //TODO: |
257 | if(pf_smooth) { | 257 | if(pf_smooth) { |
258 | pfbd = pf_d(pf)+2*pf_shell; | 258 | pfbd = pf_d(pf)+2*pf_shell; |
259 | hull() { | 259 | hull() { |
260 | cylinder(d=pfbd,h=pfbl,$fn=pfbd*fnd); | 260 | cylinder(d=pfbd,h=pfbl,$fn=pfbd*fnd); |
261 | translate([-epsilon/2,0,0]) { | 261 | translate([-epsilon/2,0,0]) { |
262 | cube(size=[epsilon,filament_elevation,pfbl-filament_elevation+pfbd/2]); | 262 | cube(size=[epsilon,filament_elevation,pfbl-filament_elevation+pfbd/2]); |
263 | mirror([0,1,0]) | 263 | mirror([0,1,0]) |
264 | cube(size=[epsilon,body_h-filament_elevation,pfbl-body_h+filament_elevation+pfbd/2]); | 264 | cube(size=[epsilon,body_h-filament_elevation,pfbl-body_h+filament_elevation+pfbd/2]); |
265 | }//translate | 265 | }//translate |
266 | }//hull | 266 | }//hull |
267 | }else{ | 267 | }else{ |
268 | pfb2a = pf_d(pf)+2*pf_shell; pfba = pfb2a/2; | 268 | pfb2a = pf_d(pf)+2*pf_shell; pfba = pfb2a/2; |
269 | pfbd = pfb2a/cos(30); | 269 | pfbd = pfb2a/cos(30); |
270 | pfbs = pfb2a*tan(30); | 270 | pfbs = pfb2a*tan(30); |
271 | cylinder(d=pfbd,h=pfbl,$fn=6); | 271 | cylinder(d=pfbd,h=pfbl,$fn=6); |
272 | translate([-pfbs/2,0,0]) { | 272 | translate([-pfbs/2,0,0]) { |
273 | hull() { | 273 | hull() { |
274 | translate([0,-pfba,0]) cube(size=[pfbs,pfb2a,pfbl]); | 274 | translate([0,-pfba,0]) cube(size=[pfbs,pfb2a,pfbl]); |
275 | cube(size=[pfbs,filament_elevation,pfbl-filament_elevation+pfba]); | 275 | cube(size=[pfbs,filament_elevation,pfbl-filament_elevation+pfba]); |
276 | mirror([0,1,0]) | 276 | mirror([0,1,0]) |
277 | cube(size=[pfbs,body_h-filament_elevation,pfbl-body_h+filament_elevation+pfba]); | 277 | cube(size=[pfbs,body_h-filament_elevation,pfbl-body_h+filament_elevation+pfba]); |
278 | }//hull | 278 | }//hull |
279 | }//translate*/ | 279 | }//translate*/ |
280 | }//if(pf_smooth) | 280 | }//if(pf_smooth) |
281 | }//translate rotate translate rotate translate | 281 | }//translate rotate translate rotate translate |
282 | }//union (first child of difference) | 282 | }//union (first child of difference) |
283 | 283 | ||
284 | // protrusion | 284 | // protrusion |
285 | translate([0,0,-1]) | 285 | translate([0,0,-1]) |
286 | cylinder(d=protrusion_d+protrusion_tolerance_h,h=protrusion_h+protrusion_tolerance_v+1,$fn=fnd*(protrusion_d+protrusion_tolerance_h)); | 286 | cylinder(d=protrusion_d+protrusion_tolerance_h,h=protrusion_h+protrusion_tolerance_v+1,$fn=fnd*(protrusion_d+protrusion_tolerance_h)); |
287 | // mount screw holes | 287 | // mount screw holes |
288 | for(zr=[0:90:359]) rotate([0,0,zr]) translate([mount_d/2,0,0]) { | 288 | for(zr=[0:90:359]) rotate([0,0,zr]) translate([mount_d/2,0,0]) { |
289 | translate([0,0,mount_screw_l-mount_depth-(bridges?layer_height:-epsilon)]) | 289 | translate([0,0,mount_screw_l-mount_depth-(bridges?layer_height:-epsilon)]) |
290 | mirror([0,0,1]) | 290 | mirror([0,0,1]) |
291 | cylinder(d=mount_screw_d+mount_screw_d_tolerance, | 291 | cylinder(d=mount_screw_d+mount_screw_d_tolerance, |
292 | h=mount_screw_l-mount_depth+1, | 292 | h=mount_screw_l-mount_depth+1, |
293 | $fn=fnd*(mount_screw_d+mount_screw_d_tolerance)); | 293 | $fn=fnd*(mount_screw_d+mount_screw_d_tolerance)); |
294 | translate([0,0,mount_screw_l-mount_depth]) | 294 | translate([0,0,mount_screw_l-mount_depth]) |
295 | cylinder(d=mount_screwhead_d,h=body_h+1,$fn=fnd*mount_screwhead_d); | 295 | cylinder(d=mount_screwhead_d,h=body_h+1,$fn=fnd*mount_screwhead_d); |
296 | }//for | 296 | }//for |
297 | // pushfit | 297 | // pushfit |
298 | pf_offset = mount_d/sqrt(2)/2+mount_screw_d; | 298 | pf_offset = mount_d/sqrt(2)/2+mount_screw_d; |
299 | translate([0,0,filament_elevation]) | 299 | translate([0,0,filament_elevation]) |
300 | rotate([0,0,45]) translate([pulley_d/2+filament_offset,0,0]) | 300 | rotate([0,0,45]) translate([pulley_d/2+filament_offset,0,0]) |
301 | rotate([-90,0,0]) | 301 | rotate([-90,0,0]) |
302 | translate([0,0,pf_offset]) | 302 | translate([0,0,pf_offset]) |
303 | rotate([0,0,180]) { | 303 | rotate([0,0,180]) { |
304 | pushfit(pf); | 304 | pushfit(pf); |
305 | mirror([0,0,1]) { | 305 | mirror([0,0,1]) { |
306 | fh = 1.5* (filament_guide_d-filament_path_d)/2; | 306 | fh = 1.5* (filament_guide_d-filament_path_d)/2; |
307 | fo = pf_offset -filament_path_d /*(idler_d+idler_clearance)/2*/-fh; | 307 | fo = pf_offset -filament_path_d /*(idler_d+idler_clearance)/2*/-fh; |
308 | translate([0,0,-1]) teardrop(d=filament_guide_d,h=fo/2,angle=225); | 308 | translate([0,0,-1]) teardrop(d=filament_guide_d,h=fo/2,angle=225); |
309 | translate([0,0,-1]) teardrop(d=filament_path_d,h=gearbox_d/2+1,angle=-225); | 309 | translate([0,0,-1]) teardrop(d=filament_path_d,h=gearbox_d/2+1,angle=-225); |
310 | translate([0,0,fo+epsilon]) | 310 | translate([0,0,fo+epsilon]) |
311 | cylinder(d1=filament_path_d,d2=filament_guide_d,h=fh,$fn=fnd*filament_guide_d); | 311 | cylinder(d1=filament_path_d,d2=filament_guide_d,h=fh,$fn=fnd*filament_guide_d); |
312 | }//mirror | 312 | }//mirror |
313 | }//rotate translate rotate translate rotate translate | 313 | }//rotate translate rotate translate rotate translate |
314 | // pulley | 314 | // pulley |
315 | cylinder(d=pulley_d+pulley_small_d_clearance,h=body_h+1,$fn=fnd*(pulley_d+pulley_d_clearance)); | 315 | cylinder(d=pulley_d+pulley_small_d_clearance,h=body_h+1,$fn=fnd*(pulley_d+pulley_d_clearance)); |
316 | cylinder(d=pulley_d+pulley_d_clearance,ls_z-max(idler_h,filament_guide_d)/2,$fn=fnd*(pulley_d+pulley_d_clearance)); | 316 | cylinder(d=pulley_d+pulley_d_clearance,ls_z-max(idler_h,filament_guide_d)/2,$fn=fnd*(pulley_d+pulley_d_clearance)); |
317 | 317 | ||
318 | translate([0,0,ls_z-ls_h/2]) { | 318 | translate([0,0,ls_z-ls_h/2]) { |
319 | // idler travel | 319 | // idler travel |
320 | translate([mount_d/2,0,0]) | 320 | translate([mount_d/2,0,0]) |
321 | rotate([0,0,45]) | 321 | rotate([0,0,45]) |
322 | rotate_extrude(angle=90,$fn=fnr*(shortwing+(idler_d+idler_clearance)/2)) | 322 | rotate_extrude(angle=90,$fn=fnr*(shortwing+(idler_d+idler_clearance)/2)) |
323 | square([shortwing+(idler_d+idler_clearance)/2,ls_h]); | 323 | square([shortwing+(idler_d+idler_clearance)/2,ls_h]); |
324 | // idler itself | 324 | // idler itself |
325 | place_idler() | 325 | place_idler() |
326 | cylinder(d=idler_d+idler_clearance,h=ls_h,$fn=fnd*(idler_d+idler_clearance)); | 326 | cylinder(d=idler_d+idler_clearance,h=ls_h,$fn=fnd*(idler_d+idler_clearance)); |
327 | // lever space | 327 | // lever space |
328 | echo(atan(1-2*fsw/gearbox_d)); | ||
329 | rotate([0,0,45]) | 328 | rotate([0,0,45]) |
330 | rotate_extrude(angle=-135+max(atan(2*fsw/gearbox_d-1),atan(gearbox_d/mount_d-1))) | 329 | rotate_extrude(angle=-135+max(atan(2*fsw/gearbox_d-1),atan(gearbox_d/mount_d-1))) |
331 | square([gearbox_d/2+1,ls_h]); | 330 | square([gearbox_d/2+1,ls_h]); |
332 | } | 331 | } |
333 | 332 | ||
334 | // back side cutout | 333 | // back side cutout |
335 | // XXX: this is somewhat ugly and potentially bugged, | 334 | // XXX: this is somewhat ugly and potentially bugged, |
336 | // but I want to sleep. | 335 | // but I want to sleep. |
337 | a0_ = atan( | 336 | a0_ = atan( |
338 | (mount_d/sqrt(2)/2+mount_screw_d+pf_h(pf)+gearbox_d/2) | 337 | (mount_d/sqrt(2)/2+mount_screw_d+pf_h(pf)+gearbox_d/2) |
339 | / | 338 | / |
340 | ( | 339 | ( |
341 | pulley_d/2+filament_offset- | 340 | pulley_d/2+filament_offset- |
342 | (pf_d(pf)+2*pf_shell)/2/cos(30) | 341 | (pf_d(pf)+2*pf_shell)/2/cos(30) |
343 | ) | 342 | ) |
344 | ); | 343 | ); |
345 | a0 = -135 + ( (a0_>0) ? a0_ : 180+a0_ ); | 344 | a0 = -135 + ( (a0_>0) ? a0_ : 180+a0_ ); |
346 | a1 = atan((longwing-lever_thickness/2)/(gearbox_d/2)); | 345 | a1 = atan((longwing-lever_thickness/2)/(gearbox_d/2)); |
347 | translate([0,0,ls_z]) difference() { | 346 | translate([0,0,ls_z]) difference() { |
348 | rotate([0,0,-180+a0]) | 347 | rotate([0,0,-180+a0]) |
349 | rotate_extrude(angle=a1-a0) | 348 | rotate_extrude(angle=a1-a0) |
350 | translate([0,-ls_h/2]) | 349 | translate([0,-ls_h/2]) |
351 | square([sqrt(pow(gearbox_d/2,2)+pow(longwing-lever_thickness/2,2))+1, | 350 | square([sqrt(pow(gearbox_d/2,2)+pow(longwing-lever_thickness/2,2))+1, |
352 | ls_h]); | 351 | ls_h]); |
353 | translate([-mount_d/2,0,0]) | 352 | translate([-mount_d/2,0,0]) |
354 | cylinder(d=gearbox_d-mount_d,h=ls_h+2,center=true,$fn=fnd*(gearbox_d-mount_d)); | 353 | cylinder(d=gearbox_d-mount_d,h=ls_h+2,center=true,$fn=fnd*(gearbox_d-mount_d)); |
355 | }//difference translate | 354 | }//difference translate |
356 | 355 | ||
357 | //translate([-mount_d/2,-longwing,filament_elevation]) | 356 | //translate([-mount_d/2,-longwing,filament_elevation]) |
358 | if(!tensioner) /* XXX: this seems to be bullshit, but it's so old, that it's historical bullshit */ | 357 | if(!tensioner) /* XXX: this seems to be bullshit, but it's so old, that it's historical bullshit */ |
359 | translate([mount_d/2,-longwing,filament_elevation]) | 358 | translate([mount_d/2,-longwing,filament_elevation]) |
360 | rotate([0,-90,0]) difference() { | 359 | rotate([0,-90,0]) difference() { |
361 | cylinder(d=spring_d+spring_d_clearance,h=spring_lc+spring_dl,$fn=fnd*(spring_d+spring_d_clearance)); | 360 | cylinder(d=spring_d+spring_d_clearance,h=spring_lc+spring_dl,$fn=fnd*(spring_d+spring_d_clearance)); |
362 | translate([0,0,spring_lc+spring_dl]) sphere(d=spring_d*3/4,$fn=fnd*spring_d*3/4); | 361 | translate([0,0,spring_lc+spring_dl]) sphere(d=spring_d*3/4,$fn=fnd*spring_d*3/4); |
363 | } | 362 | } |
364 | 363 | ||
365 | // spring tensioner | 364 | // spring tensioner |
366 | translate([-gearbox_d/2,-longwing,ls_z]) rotate([0,-90,0]) { | 365 | translate([-gearbox_d/2,-longwing,ls_z]) rotate([0,-90,0]) { |
367 | if(!tensioner) finger_indent(d=lever_thickness-1,r=15); else { | 366 | if(!tensioner) finger_indent(d=lever_thickness-1,r=15); else { |
368 | mirror([0,0,1]) { | 367 | mirror([0,0,1]) { |
369 | translate([0,0,st_thickshell]) | 368 | translate([0,0,st_thickshell]) |
370 | hull() for(o=[0,spring_d]) translate([0,-o,0]) | 369 | hull() for(o=[0,spring_d]) translate([0,-o,0]) |
371 | rotate([0,0,30]) | 370 | rotate([0,0,30]) |
372 | cylinder(d=st_nut_d+st_nut_d_tolerance,h=st_nut_h+st_nut_h_tolerance,$fn=6); | 371 | cylinder(d=st_nut_d+st_nut_d_tolerance,h=st_nut_h+st_nut_h_tolerance,$fn=6); |
373 | translate([0,0,-1]) cylinder(d=st_screw_d+st_screw_d_tolerance,h=fsw+2,$fn=fnd*(st_screw_d+st_screw_d_tolerance)); | 372 | translate([0,0,-1]) cylinder(d=st_screw_d+st_screw_d_tolerance,h=fsw+2,$fn=fnd*(st_screw_d+st_screw_d_tolerance)); |
374 | bigd = spring_d+spring_d_clearance; | 373 | bigd = spring_d+spring_d_clearance; |
375 | hf = (bigd-st_screw_d-st_screw_d_tolerance)/2; | 374 | hf = (bigd-st_screw_d-st_screw_d_tolerance)/2; |
376 | translate([0,0,st_thickshell+st_nut_h+st_nut_h_tolerance+st_thinshell-epsilon]) { | 375 | translate([0,0,st_thickshell+st_nut_h+st_nut_h_tolerance+st_thinshell-epsilon]) { |
377 | cylinder(d1=st_screw_d+st_screw_d_tolerance,d2=bigd, | 376 | cylinder(d1=st_screw_d+st_screw_d_tolerance,d2=bigd, |
378 | h=hf+epsilon, $fn=fnd*bigd); | 377 | h=hf+epsilon, $fn=fnd*bigd); |
379 | translate([0,-(st_thinshell+st_split_w_tolerance)/2,0]) | 378 | translate([0,-(st_thinshell+st_split_w_tolerance)/2,0]) |
380 | cube(size=[body_h-ls_z+1,st_thinshell+st_split_w_tolerance,fsw+1]); | 379 | cube(size=[body_h-ls_z+1,st_thinshell+st_split_w_tolerance,fsw+1]); |
381 | } | 380 | } |
382 | translate([0,0,st_thickshell+st_nut_h+st_nut_h_tolerance+st_thinshell+hf-epsilon]) | 381 | translate([0,0,st_thickshell+st_nut_h+st_nut_h_tolerance+st_thinshell+hf-epsilon]) |
383 | cylinder(d=bigd,h=fsw+1,$fn=fnd*bigd); | 382 | cylinder(d=bigd,h=fsw+1,$fn=fnd*bigd); |
384 | } | 383 | } |
385 | } | 384 | } |
386 | } | 385 | } |
387 | 386 | ||
388 | }//difference | 387 | }//difference |
389 | 388 | ||
390 | if(supports) intersection() { | 389 | if(supports) intersection() { |
391 | difference() { | 390 | difference() { |
392 | translate([0,0,ls_z-ls_h/2-epsilon]) | 391 | translate([0,0,ls_z-ls_h/2-epsilon]) |
393 | cylinder(d=gearbox_d,h=ls_h+2*epsilon,$fn=fnd*gearbox_d); | 392 | cylinder(d=gearbox_d,h=ls_h+2*epsilon,$fn=fnd*gearbox_d); |
394 | cylinder(d=pulley_d+pulley_d_clearance,h=body_h+1,$fn=fnd*(pulley_d+pulley_d_clearance)); | 393 | cylinder(d=pulley_d+pulley_d_clearance,h=body_h+1,$fn=fnd*(pulley_d+pulley_d_clearance)); |
395 | } | 394 | } |
396 | // supports | 395 | // supports |
397 | // TODO: hardcoded stuff below… | 396 | // TODO: hardcoded stuff below… |
398 | if(false) { // parallel | 397 | if(false) { // parallel |
399 | for(y=[-gearbox_d:4:gearbox_d]) | 398 | for(y=[-gearbox_d:4:gearbox_d]) |
400 | translate([0,y-extrusion_width/2,0]) | 399 | translate([0,y-extrusion_width/2,0]) |
401 | cube(size=[gearbox_d,extrusion_width,body_h]); | 400 | cube(size=[gearbox_d,extrusion_width,body_h]); |
402 | }else{ // radial | 401 | }else{ // radial |
403 | for(zr=[-65:(65+50)/7:50]) | 402 | for(zr=[-65:(65+50)/7:50]) |
404 | rotate([0,0,zr]) translate([0,-extrusion_width/2,0]) | 403 | rotate([0,0,zr]) translate([0,-extrusion_width/2,0]) |
405 | cube(size=[gearbox_d,extrusion_width,body_h]); | 404 | cube(size=[gearbox_d,extrusion_width,body_h]); |
406 | } | 405 | } |
407 | } | 406 | } |
408 | 407 | ||
409 | }//body module | 408 | }//body module |
410 | 409 | ||
411 | module springpad() { | 410 | module springpad() { |
412 | smalld=st_screw_d+st_screw_d_tolerance+min_xy_shell; | 411 | smalld=st_screw_d+st_screw_d_tolerance+min_xy_shell; |
413 | bigd = spring_d+spring_d_clearance/2; | 412 | bigd = spring_d+spring_d_clearance/2; |
414 | hf = (bigd-smalld)/2; | 413 | hf = (bigd-smalld)/2; |
415 | h = hf*3.5; | 414 | h = hf*3.5; |
416 | translate([-gearbox_d/2+st_thickshell+st_nut_h+st_nut_h_tolerance+st_thinshell+1,-longwing,filament_elevation]) | 415 | translate([-gearbox_d/2+st_thickshell+st_nut_h+st_nut_h_tolerance+st_thinshell+1,-longwing,filament_elevation]) |
417 | rotate([0,90,0]) difference() { | 416 | rotate([0,90,0]) difference() { |
418 | union() { | 417 | union() { |
419 | cylinder(d1=smalld,d2=bigd,h=hf,$fn=fnd*bigd); | 418 | cylinder(d1=smalld,d2=bigd,h=hf,$fn=fnd*bigd); |
420 | translate([0,0,hf-epsilon]) | 419 | translate([0,0,hf-epsilon]) |
421 | cylinder(d=bigd,h=h-hf,$fn=fnd*bigd); | 420 | cylinder(d=bigd,h=h-hf,$fn=fnd*bigd); |
422 | translate([0,0,h]) | 421 | translate([0,0,h]) |
423 | sphere(d=spring_d*3/4,$fn=fnd*spring_d*3/4); | 422 | sphere(d=spring_d*3/4,$fn=fnd*spring_d*3/4); |
424 | l = body_h-ls_z; | 423 | l = body_h-ls_z; |