-rw-r--r-- | another.scad | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/another.scad b/another.scad index 55fda78..b2e6c74 100644 --- a/another.scad +++ b/another.scad | |||
@@ -60,49 +60,49 @@ module the_extruder( | |||
60 | mount_screw_d_tolerance=.4, | 60 | mount_screw_d_tolerance=.4, |
61 | idler_v_tolerance=.5, | 61 | idler_v_tolerance=.5, |
62 | knob_bore_d_tolerance=.6, | 62 | knob_bore_d_tolerance=.6, |
63 | st_nut_h_tolerance=.2, | 63 | st_nut_h_tolerance=.2, |
64 | st_nut_d_tolerance=.2,/* TODO: make it st_nut_w_tolerance */ | 64 | st_nut_d_tolerance=.2,/* TODO: make it st_nut_w_tolerance */ |
65 | st_screw_d_tolerance=.5, | 65 | st_screw_d_tolerance=.5, |
66 | st_split_w_tolerance = .3, | 66 | st_split_w_tolerance = .3, |
67 | 67 | ||
68 | min_z_shell = 4*layer_height, // the very minimal shell thickness along z-axis. | 68 | min_z_shell = 4*layer_height, // the very minimal shell thickness along z-axis. |
69 | min_xy_shell = 2*extrusion_width, | 69 | min_xy_shell = 2*extrusion_width, |
70 | 70 | ||
71 | what="lever", // lever|body|knob|springpad|* | 71 | what="lever", // lever|body|knob|springpad|* |
72 | left=false, | 72 | left=false, |
73 | vitamins = true, | 73 | vitamins = true, |
74 | supports = false, bridges = true, | 74 | supports = false, bridges = true, |
75 | tensioner = true, | 75 | tensioner = true, |
76 | debug = false | 76 | debug = false |
77 | ) { | 77 | ) { |
78 | fnd = 2*PI; fnr = 2*fnd; | 78 | fnd = 2*PI; fnr = 2*fnd; |
79 | 79 | ||
80 | idler_filament_offset = filament_path_d/2; // -filament_offset; | 80 | idler_filament_offset = filament_path_d/2; // -filament_offset; |
81 | lever_shell = mount_screwhead_h+0.5; | 81 | lever_shell = mount_screwhead_h+0.5; |
82 | lever_thickness=max(spring_d+spring_d_clearance+layer_height*8,idler_h+idler_v_tolerance+2*lever_shell); | 82 | lever_thickness=max(spring_d+spring_d_clearance+layer_height*8,idler_h+idler_v_tolerance+2*lever_shell); |
83 | lsd = idler_d-idler_clearance*2; // the diameter of lever thingie | 83 | lsd = idler_d-idler_clearance*2; // the diameter of lever thingie |
84 | longwing=(mount_d+mount_screw_d+mount_screw_d_tolerance+spring_d+spring_d_clearance)/2+extrusion_width; | 84 | longwing=(mount_d+mount_screw_d+mount_screw_d_tolerance+spring_d+spring_d_clearance)/2+min_xy_shell; |
85 | shortwing = let(a=mount_d/2,c=(pulley_d+idler_d)/2/sqrt(2)) | 85 | shortwing = let(a=mount_d/2,c=(pulley_d+idler_d)/2/sqrt(2)) |
86 | sqrt(c*c+pow(a-c,2)); | 86 | sqrt(c*c+pow(a-c,2)); |
87 | longwing_travel = idler_travel*longwing/shortwing; | 87 | longwing_travel = idler_travel*longwing/shortwing; |
88 | h_ = (pulley_d+idler_d)/(2*sqrt(2)); | 88 | h_ = (pulley_d+idler_d)/(2*sqrt(2)); |
89 | ri = sqrt( pow(h_,2) + pow(mount_d/2-h_,2) ); | 89 | ri = sqrt( pow(h_,2) + pow(mount_d/2-h_,2) ); |
90 | spring_dl = idler_travel*longwing/ri; | 90 | spring_dl = idler_travel*longwing/ri; |
91 | // finger and spring support | 91 | // finger and spring support |
92 | fsw = gearbox_d-(gearbox_d-mount_d)/2-max(spring_lc,longwing_travel+(gearbox_d-mount_d)/2); | 92 | fsw = gearbox_d-(gearbox_d-mount_d)/2-max(spring_lc,longwing_travel+(gearbox_d-mount_d)/2); |
93 | 93 | ||
94 | mount_min_depth = mounthole_min_depth ? mounthole_min_depth : mounthole_depth-1; | 94 | mount_min_depth = mounthole_min_depth ? mounthole_min_depth : mounthole_depth-1; |
95 | mount_max_depth = mounthole_max_depth ? mounthole_max_depth : mounthole_depth+1; | 95 | mount_max_depth = mounthole_max_depth ? mounthole_max_depth : mounthole_depth+1; |
96 | filament_elevation=protrusion_h+pulley_elevation+teeth_elevation; | 96 | filament_elevation=protrusion_h+pulley_elevation+teeth_elevation; |
97 | ls_z = filament_elevation; // leverspace mid-z | 97 | ls_z = filament_elevation; // leverspace mid-z |
98 | ls_h = lever_thickness+lever_v_clearance; // leverspace height | 98 | ls_h = lever_thickness+lever_v_clearance; // leverspace height |
99 | mount_depth = mount_screw_l - (ls_z+ls_h/2+min_z_shell); | 99 | mount_depth = mount_screw_l - (ls_z+ls_h/2+min_z_shell); |
100 | body_h = max(protrusion_h+bore_l,mount_screw_l-mount_depth+mount_screwhead_h+min_z_shell,ls_z*2); | 100 | body_h = max(protrusion_h+bore_l,mount_screw_l-mount_depth+mount_screwhead_h+min_z_shell,ls_z*2); |
101 | echo("mount depth",mount_depth); | 101 | echo("mount depth",mount_depth); |
102 | 102 | ||
103 | module teardrop(r,d,h,center=false,angle=45) { | 103 | module teardrop(r,d,h,center=false,angle=45) { |
104 | dd = d ? d : (2*r); | 104 | dd = d ? d : (2*r); |
105 | $fn = dd*fnd; | 105 | $fn = dd*fnd; |
106 | cylinder(d=dd,h=h,center=center); | 106 | cylinder(d=dd,h=h,center=center); |
107 | if(angle>0) translate([0,0,center?-h/2:0]) | 107 | if(angle>0) translate([0,0,center?-h/2:0]) |
108 | rotate([0,0,angle]) | 108 | rotate([0,0,angle]) |
@@ -388,49 +388,49 @@ module the_extruder( | |||
388 | }//difference | 388 | }//difference |
389 | 389 | ||
390 | if(supports) intersection() { | 390 | if(supports) intersection() { |
391 | difference() { | 391 | difference() { |
392 | translate([0,0,ls_z-ls_h/2-epsilon]) | 392 | translate([0,0,ls_z-ls_h/2-epsilon]) |
393 | cylinder(d=gearbox_d,h=ls_h+2*epsilon,$fn=fnd*gearbox_d); | 393 | 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)); | 394 | cylinder(d=pulley_d+pulley_d_clearance,h=body_h+1,$fn=fnd*(pulley_d+pulley_d_clearance)); |
395 | } | 395 | } |
396 | // supports | 396 | // supports |
397 | // TODO: hardcoded stuff below… | 397 | // TODO: hardcoded stuff below… |
398 | if(false) { // parallel | 398 | if(false) { // parallel |
399 | for(y=[-gearbox_d:4:gearbox_d]) | 399 | for(y=[-gearbox_d:4:gearbox_d]) |
400 | translate([0,y-extrusion_width/2,0]) | 400 | translate([0,y-extrusion_width/2,0]) |
401 | cube(size=[gearbox_d,extrusion_width,body_h]); | 401 | cube(size=[gearbox_d,extrusion_width,body_h]); |
402 | }else{ // radial | 402 | }else{ // radial |
403 | for(zr=[-65:(65+50)/7:50]) | 403 | for(zr=[-65:(65+50)/7:50]) |
404 | rotate([0,0,zr]) translate([0,-extrusion_width/2,0]) | 404 | rotate([0,0,zr]) translate([0,-extrusion_width/2,0]) |
405 | cube(size=[gearbox_d,extrusion_width,body_h]); | 405 | cube(size=[gearbox_d,extrusion_width,body_h]); |
406 | } | 406 | } |
407 | } | 407 | } |
408 | 408 | ||
409 | }//body module | 409 | }//body module |
410 | 410 | ||
411 | module springpad() { | 411 | module springpad() { |
412 | smalld=st_screw_d+st_screw_d_tolerance+2*extrusion_width; | 412 | smalld=st_screw_d+st_screw_d_tolerance+min_xy_shell; |
413 | bigd = spring_d+spring_d_clearance/2; | 413 | bigd = spring_d+spring_d_clearance/2; |
414 | hf = (bigd-smalld)/2; | 414 | hf = (bigd-smalld)/2; |
415 | h = hf*3.5; | 415 | h = hf*3.5; |
416 | translate([-gearbox_d/2+st_thickshell+st_nut_h+st_nut_h_tolerance+st_thinshell+1,-longwing,filament_elevation]) | 416 | 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() { | 417 | rotate([0,90,0]) difference() { |
418 | union() { | 418 | union() { |
419 | cylinder(d1=smalld,d2=bigd,h=hf,$fn=fnd*bigd); | 419 | cylinder(d1=smalld,d2=bigd,h=hf,$fn=fnd*bigd); |
420 | translate([0,0,hf-epsilon]) | 420 | translate([0,0,hf-epsilon]) |
421 | cylinder(d=bigd,h=h-hf,$fn=fnd*bigd); | 421 | cylinder(d=bigd,h=h-hf,$fn=fnd*bigd); |
422 | translate([0,0,h]) | 422 | translate([0,0,h]) |
423 | sphere(d=spring_d*3/4,$fn=fnd*spring_d*3/4); | 423 | sphere(d=spring_d*3/4,$fn=fnd*spring_d*3/4); |
424 | l = body_h-ls_z; | 424 | l = body_h-ls_z; |
425 | w = st_thinshell; | 425 | w = st_thinshell; |
426 | hull() translate([0,-st_thinshell/2,0]) mirror([1,0,0]) { | 426 | hull() translate([0,-st_thinshell/2,0]) mirror([1,0,0]) { |
427 | translate([0,0,w]) | 427 | translate([0,0,w]) |
428 | cube(size=[l,st_thinshell,w]); | 428 | cube(size=[l,st_thinshell,w]); |
429 | cube(size=[l-w,st_thinshell,2*w]); | 429 | cube(size=[l-w,st_thinshell,2*w]); |
430 | } | 430 | } |
431 | } | 431 | } |
432 | translate([0,0,-epsilon]) | 432 | translate([0,0,-epsilon]) |
433 | cylinder(d=st_screw_d+st_screw_d_tolerance,h=2*hf+epsilon,$fn=fnd*(st_screw_d+st_screw_d_tolerance)); | 433 | cylinder(d=st_screw_d+st_screw_d_tolerance,h=2*hf+epsilon,$fn=fnd*(st_screw_d+st_screw_d_tolerance)); |
434 | } | 434 | } |
435 | } | 435 | } |
436 | 436 | ||