author | Michael Krelin <hacker@klever.net> | 2018-08-21 18:00:15 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2018-08-21 18:00:15 (UTC) |
commit | eb49701c13f76640936e7a2a7a138bd92617b147 (patch) (unidiff) | |
tree | e8e4629a861c5e9bfc15a5c6d09e471aa2bc1b38 | |
parent | fc213f6b29f62795ce33d0e0acdea1e6a6b0fffb (diff) | |
download | extrudery-eb49701c13f76640936e7a2a7a138bd92617b147.zip extrudery-eb49701c13f76640936e7a2a7a138bd92617b147.tar.gz extrudery-eb49701c13f76640936e7a2a7a138bd92617b147.tar.bz2 |
adjustments to screw mount depth
-rw-r--r-- | another.scad | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/another.scad b/another.scad index 6afa9ef..6ef7299 100644 --- a/another.scad +++ b/another.scad | |||
@@ -1,134 +1,141 @@ | |||
1 | draft=true; | 1 | draft=true; |
2 | layer_height=0.2; extrusion_width=0.4; | 2 | layer_height=0.2; extrusion_width=0.4; |
3 | epsilon=0.01; | 3 | epsilon=0.01; |
4 | $fs=0.0125; | 4 | $fs=0.0125; |
5 | 5 | ||
6 | use <pushfittery.scad>; | 6 | use <pushfittery.scad>; |
7 | include <pushfit_data.scad>; | 7 | include <pushfit_data.scad>; |
8 | 8 | ||
9 | module the_extruder( | 9 | module the_extruder( |
10 | // motor properties | 10 | // motor properties |
11 | gearbox_d = 36, | 11 | gearbox_d = 36, |
12 | mount_d = 28, // the distance between opposite mounting holes | 12 | mount_d = 28, // the distance between opposite mounting holes |
13 | mounthole_depth = 5, | 13 | mounthole_depth = 5, |
14 | mounthole_min_depth = 3, mounthole_max_depth = 4, | ||
14 | protrusion_d = 22, protrusion_h = 2.2, // the dimensions of the protrusion on top of gearbox | 15 | protrusion_d = 22, protrusion_h = 2.2, // the dimensions of the protrusion on top of gearbox |
15 | bore_d = 8, bore_l = 17.6, | 16 | bore_d = 8, bore_l = 17.6, |
16 | bore_dd = 7, | 17 | bore_dd = 7, |
17 | // pulley properties | 18 | // pulley properties |
18 | pulley_d = 11.5, pulley_h=10, | 19 | pulley_d = 11.5, pulley_h=10, |
19 | pulley_elevation = 1, // pulley elevation above the protrusion | 20 | pulley_elevation = 1, // pulley elevation above the protrusion |
20 | teeth_elevation = 7.5, // distance from the bottom of the pulley to its teeth | 21 | teeth_elevation = 7.5, // distance from the bottom of the pulley to its teeth |
21 | filament_offset = (8.25-(3.0+3.5)/2) - 11.5/2 + 1.75/2, | 22 | filament_offset = (8.25-(3.0+3.5)/2) - 11.5/2 + 1.75/2, |
22 | // idler properties | 23 | // idler properties |
23 | idler_d = 9.5, idler_h = 4, idler_id = 3,// idler dimensions: outer and inner diameters and height | 24 | idler_d = 9.5, idler_h = 4, idler_id = 3,// idler dimensions: outer and inner diameters and height |
24 | // spring properties | 25 | // spring properties |
25 | spring_d = 10, spring_lc = 9.6, // spring diameter and compressed length | 26 | spring_d = 10, spring_lc = 9.6, // spring diameter and compressed length |
26 | // filament path properties | 27 | // filament path properties |
27 | filament_d = 1.75, | 28 | filament_d = 1.75, |
28 | filament_path_d = 2, | 29 | filament_path_d = 2, |
29 | filament_guide_d = 4, // PTFE filament guide diameter | 30 | filament_guide_d = 4, // PTFE filament guide diameter |
30 | // knob properties | 31 | // knob properties |
31 | knob_h = 10, | 32 | knob_h = 10, |
32 | knob_bore_l = 4, | 33 | knob_bore_l = 4, |
33 | knob_indent_d = 4, | 34 | knob_indent_d = 4, |
34 | knob_indents = 12, | 35 | knob_indents = 12, |
35 | // spring tensioner | 36 | // spring tensioner |
36 | st_nut_d = 9, st_nut_h = 4, | 37 | st_nut_d = 9, st_nut_h = 4, |
37 | st_screw_d = 5, | 38 | st_screw_d = 5, |
38 | st_thickshell = 8*extrusion_width, st_thinshell = 4*extrusion_width, | 39 | st_thickshell = 8*extrusion_width, st_thinshell = 4*extrusion_width, |
39 | 40 | ||
40 | // screw it | 41 | // screw it |
41 | mount_screw_d = 3.1, mount_screw_l = 20, | 42 | mount_screw_d = 3.1, mount_screw_l = 20, |
42 | mount_screwhead_d=6, mount_screwhead_h=3, | 43 | mount_screwhead_d=6, mount_screwhead_h=3, |
43 | idler_screw_d = 3, | 44 | idler_screw_d = 3, |
44 | idler_screwhead_d=6, idler_screwhead_h=3, | 45 | idler_screwhead_d=6, idler_screwhead_h=3, |
45 | 46 | ||
46 | pf = pushfit_embeddest, | 47 | pf = pushfit_embeddest, |
47 | pf_shell = max(3*layer_height,3*extrusion_width), | 48 | pf_shell = max(3*layer_height,3*extrusion_width), |
48 | pf_smooth = true, | 49 | pf_smooth = true, |
49 | 50 | ||
50 | // empty spaces | 51 | // empty spaces |
51 | idler_travel = 3, // how far should idler travel when pressed | 52 | idler_travel = 3, // how far should idler travel when pressed |
52 | idler_clearance=1, | 53 | idler_clearance=1, |
53 | pulley_d_clearance=2, | 54 | pulley_d_clearance=2, |
54 | lever_v_clearance=.7, // vertical clearance for the lever | 55 | lever_v_clearance=.7, // vertical clearance for the lever |
55 | spring_d_clearance=1, | 56 | spring_d_clearance=1, |
56 | protrusion_tolerance_h=.5, // horizontal tolerance for the motor protrusion | 57 | protrusion_tolerance_h=.5, // horizontal tolerance for the motor protrusion |
57 | protrusion_tolerance_v=.5, // vertical tolerance for the motor protrusion | 58 | protrusion_tolerance_v=.5, // vertical tolerance for the motor protrusion |
58 | mount_screw_d_tolerance=.4, | 59 | mount_screw_d_tolerance=.4, |
59 | idler_v_tolerance=.5, | 60 | idler_v_tolerance=.5, |
60 | knob_bore_d_tolerance=.6, | 61 | knob_bore_d_tolerance=.6, |
61 | st_nut_h_tolerance=.2, | 62 | st_nut_h_tolerance=.2, |
62 | st_nut_d_tolerance=.2,/* TODO: make it st_nut_w_tolerance */ | 63 | st_nut_d_tolerance=.2,/* TODO: make it st_nut_w_tolerance */ |
63 | st_screw_d_tolerance=.5, | 64 | st_screw_d_tolerance=.5, |
64 | 65 | ||
66 | min_z_shell = 4*layer_height, // the very minimal shell thickness along z-axis. | ||
67 | |||
65 | what="lever", // lever|body|knob|springpad|* | 68 | what="lever", // lever|body|knob|springpad|* |
66 | left=false, | 69 | left=false, |
67 | vitamins = true, | 70 | vitamins = true, |
68 | supports = false, bridges = true, | 71 | supports = false, bridges = true, |
69 | tensioner = true, | 72 | tensioner = true, |
70 | debug = false | 73 | debug = false |
71 | ) { | 74 | ) { |
72 | fnd = 2*PI; fnr = 2*fnd; | 75 | fnd = 2*PI; fnr = 2*fnd; |
73 | 76 | ||
74 | idler_filament_offset = filament_path_d/2; // -filament_offset; | 77 | idler_filament_offset = filament_path_d/2; // -filament_offset; |
75 | lever_shell = mount_screwhead_h+0.5; | 78 | lever_shell = mount_screwhead_h+0.5; |
76 | lever_thickness=max(spring_d+spring_d_clearance+layer_height*8,idler_h+idler_v_tolerance+2*lever_shell); | 79 | lever_thickness=max(spring_d+spring_d_clearance+layer_height*8,idler_h+idler_v_tolerance+2*lever_shell); |
77 | lsd = idler_d-idler_clearance*2; | 80 | lsd = idler_d-idler_clearance*2; |
78 | longwing=gearbox_d/2+spring_d/2+lsd/2; | 81 | longwing=gearbox_d/2+spring_d/2+lsd/2; |
79 | h_ = (pulley_d+idler_d)/(2*sqrt(2)); | 82 | h_ = (pulley_d+idler_d)/(2*sqrt(2)); |
80 | ri = sqrt( pow(h_,2) + pow(mount_d/2-h_,2) ); | 83 | ri = sqrt( pow(h_,2) + pow(mount_d/2-h_,2) ); |
81 | spring_dl = idler_travel*longwing/ri; | 84 | spring_dl = idler_travel*longwing/ri; |
82 | 85 | ||
86 | mount_min_depth = mounthole_min_depth ? mounthole_min_depth : mounthole_depth-1; | ||
87 | mount_max_depth = mounthole_max_depth ? mounthole_max_depth : mounthole_depth+1; | ||
83 | filament_elevation=protrusion_h+pulley_elevation+teeth_elevation; | 88 | filament_elevation=protrusion_h+pulley_elevation+teeth_elevation; |
84 | ls_z = filament_elevation; // leverspace mid-z | 89 | ls_z = filament_elevation; // leverspace mid-z |
85 | body_h = max(protrusion_h+bore_l,mount_screw_l-mounthole_depth/2+mount_screwhead_h,ls_z*2); | ||
86 | ls_h = lever_thickness+lever_v_clearance; // leverspace height | 90 | ls_h = lever_thickness+lever_v_clearance; // leverspace height |
91 | mount_depth = mount_screw_l - (ls_z+ls_h/2+min_z_shell); | ||
92 | body_h = max(protrusion_h+bore_l,mount_screw_l-mount_depth+mount_screwhead_h+min_z_shell,ls_z*2); | ||
93 | echo("mount depth",mount_depth); | ||
87 | 94 | ||
88 | module mirrorleft() { | 95 | module mirrorleft() { |
89 | mirror([left?0:1,0,0]) children(); | 96 | mirror([left?0:1,0,0]) children(); |
90 | } | 97 | } |
91 | module place_idler() { | 98 | module place_idler() { |
92 | rotate([0,0,45]) | 99 | rotate([0,0,45]) |
93 | translate([(pulley_d+idler_d)/2,0,0]) | 100 | translate([(pulley_d+idler_d)/2,0,0]) |
94 | children(); | 101 | children(); |
95 | } | 102 | } |
96 | module finger_indent(d=lever_thickness,depth/*=1*/,r/*=15*/) { | 103 | module finger_indent(d=lever_thickness,depth/*=1*/,r/*=15*/) { |
97 | if(depth) { | 104 | if(depth) { |
98 | hh = (-4*pow(depth,2)+pow(d,2))/(8*depth); | 105 | hh = (-4*pow(depth,2)+pow(d,2))/(8*depth); |
99 | rr = depth+hh; | 106 | rr = depth+hh; |
100 | translate([0,0,hh]) sphere(r=rr,$fn=fnr*rr); | 107 | translate([0,0,hh]) sphere(r=rr,$fn=fnr*rr); |
101 | }else if(r) { | 108 | }else if(r) { |
102 | hh=sqrt(pow(r,2)-pow(d,2)/4); | 109 | hh=sqrt(pow(r,2)-pow(d,2)/4); |
103 | translate([0,0,hh]) sphere(r=r,$fn=fnr*r); | 110 | translate([0,0,hh]) sphere(r=r,$fn=fnr*r); |
104 | } | 111 | } |
105 | } | 112 | } |
106 | 113 | ||
107 | % if(vitamins) mirrorleft() { | 114 | % if(vitamins) mirrorleft() { |
108 | translate([0,0,-epsilon]) mirror([0,0,1]) cylinder(d=gearbox_d,h=1,$fn=60); | 115 | translate([0,0,-epsilon]) mirror([0,0,1]) cylinder(d=gearbox_d,h=1,$fn=60); |
109 | for(zr=[0:90:359]) rotate([0,0,zr]) translate([mount_d/2,0,0]) | 116 | for(zr=[0:90:359]) rotate([0,0,zr]) translate([mount_d/2,0,0]) |
110 | cylinder(d=mount_screw_d,h=20,$fn=30); | 117 | cylinder(d=mount_screw_d,h=20,$fn=30); |
111 | translate([0,0,-epsilon]) cylinder(d=protrusion_d,h=protrusion_h,$fn=30); | 118 | translate([0,0,-epsilon]) cylinder(d=protrusion_d,h=protrusion_h,$fn=30); |
112 | translate([0,0,protrusion_h]) { | 119 | translate([0,0,protrusion_h]) { |
113 | difference() { | 120 | difference() { |
114 | cylinder(d=bore_d,h=bore_l,$fn=30); | 121 | cylinder(d=bore_d,h=bore_l,$fn=30); |
115 | translate([-bore_d/2-1,bore_dd-bore_d/2,-1]) | 122 | translate([-bore_d/2-1,bore_dd-bore_d/2,-1]) |
116 | cube([bore_d+2,bore_d/2,bore_l+2]); | 123 | cube([bore_d+2,bore_d/2,bore_l+2]); |
117 | } | 124 | } |
118 | translate([0,0,pulley_elevation]) { | 125 | translate([0,0,pulley_elevation]) { |
119 | cylinder(d=pulley_d,h=pulley_h,$fn=30); | 126 | cylinder(d=pulley_d,h=pulley_h,$fn=30); |
120 | translate([0,0,teeth_elevation]) { | 127 | translate([0,0,teeth_elevation]) { |
121 | place_idler() { | 128 | place_idler() { |
122 | cylinder(d=idler_d,h=idler_h,center=true,$fn=30); | 129 | cylinder(d=idler_d,h=idler_h,center=true,$fn=30); |
123 | cylinder(d=idler_screw_d,h=lever_thickness+2,center=true,$fn=30); | 130 | cylinder(d=idler_screw_d,h=lever_thickness+2,center=true,$fn=30); |
124 | }//place idler | 131 | }//place idler |
125 | // filament path | 132 | // filament path |
126 | rotate([0,0,45]) { | 133 | rotate([0,0,45]) { |
127 | translate([pulley_d/2-idler_filament_offset,0,0]) rotate([90,0,0]) { | 134 | translate([pulley_d/2-idler_filament_offset,0,0]) rotate([90,0,0]) { |
128 | cylinder(d=filament_d,h=gearbox_d,center=false,$fn=15); | 135 | cylinder(d=filament_d,h=gearbox_d,center=false,$fn=15); |
129 | }//rotate translate | 136 | }//rotate translate |
130 | translate([pulley_d/2+filament_offset,0,0]) rotate([-90,0,0]) { | 137 | translate([pulley_d/2+filament_offset,0,0]) rotate([-90,0,0]) { |
131 | cylinder(d=filament_d,h=gearbox_d,center=false,$fn=15); | 138 | cylinder(d=filament_d,h=gearbox_d,center=false,$fn=15); |
132 | translate([0,0,mount_d/sqrt(2)/2+mount_screw_d]) | 139 | translate([0,0,mount_d/sqrt(2)/2+mount_screw_d]) |
133 | pushfit(pf); | 140 | pushfit(pf); |
134 | }//rotate translate | 141 | }//rotate translate |
@@ -243,102 +250,102 @@ module the_extruder( | |||
243 | translate([0,0,st_thickshell+st_nut_h+st_nut_h_tolerance+st_thinshell-epsilon]) | 250 | translate([0,0,st_thickshell+st_nut_h+st_nut_h_tolerance+st_thinshell-epsilon]) |
244 | cylinder(d1=st_screw_d+st_screw_d_tolerance,d2=bigd, | 251 | cylinder(d1=st_screw_d+st_screw_d_tolerance,d2=bigd, |
245 | h=hf+epsilon, $fn=fnd*bigd); | 252 | h=hf+epsilon, $fn=fnd*bigd); |
246 | translate([0,0,st_thickshell+st_nut_h+st_nut_h_tolerance+st_thinshell+hf-epsilon]) | 253 | translate([0,0,st_thickshell+st_nut_h+st_nut_h_tolerance+st_thinshell+hf-epsilon]) |
247 | cylinder(d=bigd,h=fsw+1,$fn=fnd*bigd); | 254 | cylinder(d=bigd,h=fsw+1,$fn=fnd*bigd); |
248 | } | 255 | } |
249 | } | 256 | } |
250 | } | 257 | } |
251 | } // translate | 258 | } // translate |
252 | 259 | ||
253 | // pushfit bracket | 260 | // pushfit bracket |
254 | translate([0,0,filament_elevation]) | 261 | translate([0,0,filament_elevation]) |
255 | rotate([0,0,45]) translate([pulley_d/2+filament_offset,0,0]) | 262 | rotate([0,0,45]) translate([pulley_d/2+filament_offset,0,0]) |
256 | rotate([-90,0,0]) | 263 | rotate([-90,0,0]) |
257 | translate([0,0,mount_d/sqrt(2)/2+mount_screw_d-gearbox_d/2/*TODO:*/]) { | 264 | translate([0,0,mount_d/sqrt(2)/2+mount_screw_d-gearbox_d/2/*TODO:*/]) { |
258 | pfbl = pf_h(pf)+gearbox_d/2; //TODO: | 265 | pfbl = pf_h(pf)+gearbox_d/2; //TODO: |
259 | if(pf_smooth) { | 266 | if(pf_smooth) { |
260 | pfbd = pf_d(pf)+2*pf_shell; | 267 | pfbd = pf_d(pf)+2*pf_shell; |
261 | hull() { | 268 | hull() { |
262 | cylinder(d=pfbd,h=pfbl,$fn=pfbd*fnd); | 269 | cylinder(d=pfbd,h=pfbl,$fn=pfbd*fnd); |
263 | translate([-epsilon/2,0,0]) { | 270 | translate([-epsilon/2,0,0]) { |
264 | cube(size=[epsilon,filament_elevation,pfbl-filament_elevation+pfbd/2]); | 271 | cube(size=[epsilon,filament_elevation,pfbl-filament_elevation+pfbd/2]); |
265 | mirror([0,1,0]) | 272 | mirror([0,1,0]) |
266 | cube(size=[epsilon,body_h-filament_elevation,pfbl-body_h+filament_elevation+pfbd/2]); | 273 | cube(size=[epsilon,body_h-filament_elevation,pfbl-body_h+filament_elevation+pfbd/2]); |
267 | }//translate | 274 | }//translate |
268 | }//hull | 275 | }//hull |
269 | }else{ | 276 | }else{ |
270 | pfb2a = pf_d(pf)+2*pf_shell; pfba = pfb2a/2; | 277 | pfb2a = pf_d(pf)+2*pf_shell; pfba = pfb2a/2; |
271 | pfbd = pfb2a/cos(30); | 278 | pfbd = pfb2a/cos(30); |
272 | pfbs = pfb2a*tan(30); | 279 | pfbs = pfb2a*tan(30); |
273 | cylinder(d=pfbd,h=pfbl,$fn=6); | 280 | cylinder(d=pfbd,h=pfbl,$fn=6); |
274 | translate([-pfbs/2,0,0]) { | 281 | translate([-pfbs/2,0,0]) { |
275 | hull() { | 282 | hull() { |
276 | translate([0,-pfba,0]) cube(size=[pfbs,pfb2a,pfbl]); | 283 | translate([0,-pfba,0]) cube(size=[pfbs,pfb2a,pfbl]); |
277 | cube(size=[pfbs,filament_elevation,pfbl-filament_elevation+pfba]); | 284 | cube(size=[pfbs,filament_elevation,pfbl-filament_elevation+pfba]); |
278 | mirror([0,1,0]) | 285 | mirror([0,1,0]) |
279 | cube(size=[pfbs,body_h-filament_elevation,pfbl-body_h+filament_elevation+pfba]); | 286 | cube(size=[pfbs,body_h-filament_elevation,pfbl-body_h+filament_elevation+pfba]); |
280 | }//hull | 287 | }//hull |
281 | }//translate*/ | 288 | }//translate*/ |
282 | }//if(pf_smooth) | 289 | }//if(pf_smooth) |
283 | }//translate rotate translate rotate translate | 290 | }//translate rotate translate rotate translate |
284 | }//union (first child of difference) | 291 | }//union (first child of difference) |
285 | 292 | ||
286 | // protrusion | 293 | // protrusion |
287 | translate([0,0,-1]) | 294 | translate([0,0,-1]) |
288 | cylinder(d=protrusion_d+protrusion_tolerance_h,h=protrusion_h+protrusion_tolerance_v+1,$fn=fnd*(protrusion_d+protrusion_tolerance_h)); | 295 | cylinder(d=protrusion_d+protrusion_tolerance_h,h=protrusion_h+protrusion_tolerance_v+1,$fn=fnd*(protrusion_d+protrusion_tolerance_h)); |
289 | // mount screw holes | 296 | // mount screw holes |
290 | for(zr=[0:90:359]) rotate([0,0,zr]) translate([mount_d/2,0,0]) { | 297 | for(zr=[0:90:359]) rotate([0,0,zr]) translate([mount_d/2,0,0]) { |
291 | translate([0,0,mount_screw_l-mounthole_depth/2-(bridges?layer_height:-epsilon)]) | 298 | translate([0,0,mount_screw_l-mount_depth-(bridges?layer_height:-epsilon)]) |
292 | mirror([0,0,1]) | 299 | mirror([0,0,1]) |
293 | cylinder(d=mount_screw_d+mount_screw_d_tolerance, | 300 | cylinder(d=mount_screw_d+mount_screw_d_tolerance, |
294 | h=mount_screw_l-mounthole_depth/2+1, | 301 | h=mount_screw_l-mount_depth+1, |
295 | $fn=fnd*(mount_screw_d+mount_screw_d_tolerance)); | 302 | $fn=fnd*(mount_screw_d+mount_screw_d_tolerance)); |
296 | translate([0,0,mount_screw_l-mounthole_depth/2]) | 303 | translate([0,0,mount_screw_l-mount_depth]) |
297 | cylinder(d=mount_screwhead_d,h=body_h+1,$fn=fnd*mount_screwhead_d); | 304 | cylinder(d=mount_screwhead_d,h=body_h+1,$fn=fnd*mount_screwhead_d); |
298 | }//for | 305 | }//for |
299 | // pushfit | 306 | // pushfit |
300 | translate([0,0,filament_elevation]) | 307 | translate([0,0,filament_elevation]) |
301 | rotate([0,0,45]) translate([pulley_d/2+filament_offset,0,0]) | 308 | rotate([0,0,45]) translate([pulley_d/2+filament_offset,0,0]) |
302 | rotate([-90,0,0]) | 309 | rotate([-90,0,0]) |
303 | translate([0,0,mount_d/sqrt(2)/2+mount_screw_d+epsilon]) | 310 | translate([0,0,mount_d/sqrt(2)/2+mount_screw_d+epsilon]) |
304 | rotate([0,0,180]) { | 311 | rotate([0,0,180]) { |
305 | pushfit(pf); | 312 | pushfit(pf); |
306 | cylinder(d=filament_guide_d,h=gearbox_d,center=true,$fn=fnd*filament_guide_d); | 313 | cylinder(d=filament_guide_d,h=gearbox_d,center=true,$fn=fnd*filament_guide_d); |
307 | translate([0,-filament_guide_d/2/sqrt(2),0]) | 314 | translate([0,-filament_guide_d/2/sqrt(2),0]) |
308 | rotate([0,0,45]) | 315 | rotate([0,0,45]) |
309 | cube(size=[filament_guide_d/2,filament_guide_d/2,gearbox_d],center=true); | 316 | cube(size=[filament_guide_d/2,filament_guide_d/2,gearbox_d],center=true); |
310 | }//rotate translate rotate translate rotate translate | 317 | }//rotate translate rotate translate rotate translate |
311 | // pulley | 318 | // pulley |
312 | cylinder(d=pulley_d+pulley_d_clearance,h=body_h+1,$fn=fnd*(pulley_d+pulley_d_clearance)); | 319 | cylinder(d=pulley_d+pulley_d_clearance,h=body_h+1,$fn=fnd*(pulley_d+pulley_d_clearance)); |
313 | // leverspace | 320 | // leverspace |
314 | hull() for(x=[0,gearbox_d]) | 321 | hull() for(x=[0,gearbox_d]) |
315 | rotate([0,0,45]) | 322 | rotate([0,0,45]) |
316 | translate([x,0,ls_z-ls_h/2]) | 323 | translate([x,0,ls_z-ls_h/2]) |
317 | cylinder(d=idler_d+idler_clearance,h=ls_h,$fn=fnd*(idler_d+idler_clearance)); | 324 | cylinder(d=idler_d+idler_clearance,h=ls_h,$fn=fnd*(idler_d+idler_clearance)); |
318 | 325 | ||
319 | // idler clearance | 326 | // idler clearance |
320 | a=cos(45)*(pulley_d+idler_d)/2; | 327 | a=cos(45)*(pulley_d+idler_d)/2; |
321 | b=mount_d/2-a; | 328 | b=mount_d/2-a; |
322 | x=sqrt(pow(a,2)+pow(b,2)); | 329 | x=sqrt(pow(a,2)+pow(b,2)); |
323 | translate([mount_d/2,0,ls_z]) | 330 | translate([mount_d/2,0,ls_z]) |
324 | intersection() { | 331 | intersection() { |
325 | r = x+idler_d/2+idler_clearance; | 332 | r = x+idler_d/2+idler_clearance; |
326 | cylinder(r=r,h=ls_h,center=true); | 333 | cylinder(r=r,h=ls_h,center=true); |
327 | translate([-r-1,0,-ls_h/2-1]) cube(size=[2*r+2,r+1,ls_h+2]); | 334 | translate([-r-1,0,-ls_h/2-1]) cube(size=[2*r+2,r+1,ls_h+2]); |
328 | } | 335 | } |
329 | 336 | ||
330 | // back side cutout | 337 | // back side cutout |
331 | // XXX: this is somewhat ugly and potentially bugged, | 338 | // XXX: this is somewhat ugly and potentially bugged, |
332 | // but I want to sleep. | 339 | // but I want to sleep. |
333 | a0_ = atan( | 340 | a0_ = atan( |
334 | (mount_d/sqrt(2)/2+mount_screw_d+pf_h(pf)+gearbox_d/2) | 341 | (mount_d/sqrt(2)/2+mount_screw_d+pf_h(pf)+gearbox_d/2) |
335 | / | 342 | / |
336 | ( | 343 | ( |
337 | pulley_d/2+filament_offset- | 344 | pulley_d/2+filament_offset- |
338 | (pf_d(pf)+2*pf_shell)/2/cos(30) | 345 | (pf_d(pf)+2*pf_shell)/2/cos(30) |
339 | ) | 346 | ) |
340 | ); | 347 | ); |
341 | a0 = -135 + ( (a0_>0) ? a0_ : 180+a0_ ); | 348 | a0 = -135 + ( (a0_>0) ? a0_ : 180+a0_ ); |
342 | a1 = atan((longwing-lever_thickness/2)/(gearbox_d/2)); | 349 | a1 = atan((longwing-lever_thickness/2)/(gearbox_d/2)); |
343 | translate([0,0,ls_z]) difference() { | 350 | translate([0,0,ls_z]) difference() { |
344 | rotate([0,0,-180+a0]) | 351 | rotate([0,0,-180+a0]) |