author | Michael Krelin <hacker@klever.net> | 2018-08-12 00:07:46 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2018-08-12 00:07:46 (UTC) |
commit | 60f188ff063a4c6f7e5d4a1078fd520a84f829c4 (patch) (unidiff) | |
tree | 0736488044c3c37394d7a2916ad5d7c4eabcc3c2 | |
parent | e3574275ad904b8ec1b188ee91d0023ea9974cb8 (diff) | |
download | extrudery-60f188ff063a4c6f7e5d4a1078fd520a84f829c4.zip extrudery-60f188ff063a4c6f7e5d4a1078fd520a84f829c4.tar.gz extrudery-60f188ff063a4c6f7e5d4a1078fd520a84f829c4.tar.bz2 |
another: potentially even prettier pushfit arrangement
-rw-r--r-- | another.scad | 39 |
1 files changed, 26 insertions, 13 deletions
diff --git a/another.scad b/another.scad index 6af68b6..4c4af5c 100644 --- a/another.scad +++ b/another.scad | |||
@@ -1,110 +1,111 @@ | |||
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 | protrusion_d = 22, protrusion_h = 2.2, // the dimensions of the protrusion on top of gearbox | 14 | protrusion_d = 22, protrusion_h = 2.2, // the dimensions of the protrusion on top of gearbox |
15 | bore_d = 8, bore_l = 17.6, | 15 | bore_d = 8, bore_l = 17.6, |
16 | bore_dd = 7, | 16 | bore_dd = 7, |
17 | // pulley properties | 17 | // pulley properties |
18 | pulley_d = 11.5, pulley_h=10, | 18 | pulley_d = 11.5, pulley_h=10, |
19 | pulley_elevation = 1, // pulley elevation above the protrusion | 19 | pulley_elevation = 1, // pulley elevation above the protrusion |
20 | teeth_elevation = 7.5, // distance from the bottom of the pulley to its teeth | 20 | teeth_elevation = 7.5, // distance from the bottom of the pulley to its teeth |
21 | // idler properties | 21 | // idler properties |
22 | idler_d = 9.5, idler_h = 4, idler_id = 3,// idler dimensions: outer and inner diameters and height | 22 | idler_d = 9.5, idler_h = 4, idler_id = 3,// idler dimensions: outer and inner diameters and height |
23 | // spring properties | 23 | // spring properties |
24 | spring_d = 10, spring_lc = 9.6, // spring diameter and compressed length | 24 | spring_d = 10, spring_lc = 9.6, // spring diameter and compressed length |
25 | // filament path properties | 25 | // filament path properties |
26 | filament_d = 1.75, | 26 | filament_d = 1.75, |
27 | filament_path_d = 2, | 27 | filament_path_d = 2, |
28 | filament_guide_d = 4, // PTFE filament guide diameter | 28 | filament_guide_d = 4, // PTFE filament guide diameter |
29 | // knob properties | 29 | // knob properties |
30 | knob_h = 10, | 30 | knob_h = 10, |
31 | knob_bore_l = 4, | 31 | knob_bore_l = 4, |
32 | knob_indent_d = 4, | 32 | knob_indent_d = 4, |
33 | knob_indents = 12, | 33 | knob_indents = 12, |
34 | // spring tensioner | 34 | // spring tensioner |
35 | st_nut_d = 9, st_nut_h = 4, | 35 | st_nut_d = 9, st_nut_h = 4, |
36 | st_screw_d = 5, | 36 | st_screw_d = 5, |
37 | st_thickshell = 8*extrusion_width, st_thinshell = 4*extrusion_width, | 37 | st_thickshell = 8*extrusion_width, st_thinshell = 4*extrusion_width, |
38 | 38 | ||
39 | // screw it | 39 | // screw it |
40 | mount_screw_d = 3.1, mount_screw_l = 20, | 40 | mount_screw_d = 3.1, mount_screw_l = 20, |
41 | mount_screwhead_d=6, mount_screwhead_h=3, | 41 | mount_screwhead_d=6, mount_screwhead_h=3, |
42 | idler_screw_d = 3, | 42 | idler_screw_d = 3, |
43 | idler_screwhead_d=6, idler_screwhead_h=3, | 43 | idler_screwhead_d=6, idler_screwhead_h=3, |
44 | 44 | ||
45 | pf = pushfit_embeddest, | 45 | pf = pushfit_embeddest, |
46 | pf_shell = max(3*layer_height,3*extrusion_width), | 46 | pf_shell = max(3*layer_height,3*extrusion_width), |
47 | pf_smooth = true, | ||
47 | 48 | ||
48 | // empty spaces | 49 | // empty spaces |
49 | idler_travel = 3, // how far should idler travel when pressed | 50 | idler_travel = 3, // how far should idler travel when pressed |
50 | idler_clearance=1, | 51 | idler_clearance=1, |
51 | pulley_clearance=2, | 52 | pulley_clearance=2, |
52 | lever_v_clearance=.7, // vertical clearance for the lever | 53 | lever_v_clearance=.7, // vertical clearance for the lever |
53 | spring_d_clearance=1, | 54 | spring_d_clearance=1, |
54 | protrusion_tolerance_h=.5, // horizontal tolerance for the motor protrusion | 55 | protrusion_tolerance_h=.5, // horizontal tolerance for the motor protrusion |
55 | protrusion_tolerance_v=.5, // vertical tolerance for the motor protrusion | 56 | protrusion_tolerance_v=.5, // vertical tolerance for the motor protrusion |
56 | mount_screw_d_tolerance=.4, | 57 | mount_screw_d_tolerance=.4, |
57 | idler_v_tolerance=.5, | 58 | idler_v_tolerance=.5, |
58 | knob_bore_d_tolerance=.6, | 59 | knob_bore_d_tolerance=.6, |
59 | st_nut_h_tolerance=.2, | 60 | st_nut_h_tolerance=.2, |
60 | st_nut_d_tolerance=.2,/* TODO: make it st_nut_w_tolerance */ | 61 | st_nut_d_tolerance=.2,/* TODO: make it st_nut_w_tolerance */ |
61 | st_screw_d_tolerance=.3, | 62 | st_screw_d_tolerance=.3, |
62 | 63 | ||
63 | what="lever", // lever|body|knob|springpad|* | 64 | what="lever", // lever|body|knob|springpad|* |
64 | left=false, | 65 | left=false, |
65 | vitamins = true, | 66 | vitamins = true, |
66 | supports = false, bridges = true, | 67 | supports = false, bridges = true, |
67 | tensioner = true, | 68 | tensioner = true, |
68 | debug = false | 69 | debug = false |
69 | ) { | 70 | ) { |
70 | fnd = 2*PI; fnr = 2*fnd; | 71 | fnd = 2*PI; fnr = 2*fnd; |
71 | 72 | ||
72 | lever_shell = mount_screwhead_h+0.5; | 73 | lever_shell = mount_screwhead_h+0.5; |
73 | lever_thickness=max(spring_d+spring_d_clearance+layer_height*8,idler_h+idler_v_tolerance+2*lever_shell); | 74 | lever_thickness=max(spring_d+spring_d_clearance+layer_height*8,idler_h+idler_v_tolerance+2*lever_shell); |
74 | lsd = idler_d-idler_clearance*2; | 75 | lsd = idler_d-idler_clearance*2; |
75 | longwing=gearbox_d/2+spring_d/2+lsd/2; | 76 | longwing=gearbox_d/2+spring_d/2+lsd/2; |
76 | h_ = (pulley_d+idler_d)/(2*sqrt(2)); | 77 | h_ = (pulley_d+idler_d)/(2*sqrt(2)); |
77 | ri = sqrt( pow(h_,2) + pow(mount_d/2-h_,2) ); | 78 | ri = sqrt( pow(h_,2) + pow(mount_d/2-h_,2) ); |
78 | spring_dl = idler_travel*longwing/ri; | 79 | spring_dl = idler_travel*longwing/ri; |
79 | 80 | ||
80 | filament_elevation=protrusion_h+pulley_elevation+teeth_elevation; | 81 | filament_elevation=protrusion_h+pulley_elevation+teeth_elevation; |
81 | ls_z = filament_elevation; // leverspace mid-z | 82 | ls_z = filament_elevation; // leverspace mid-z |
82 | body_h = max(protrusion_h+bore_l,mount_screw_l-mounthole_depth/2+mount_screwhead_h,ls_z*2); | 83 | body_h = max(protrusion_h+bore_l,mount_screw_l-mounthole_depth/2+mount_screwhead_h,ls_z*2); |
83 | ls_h = lever_thickness+lever_v_clearance; // leverspace height | 84 | ls_h = lever_thickness+lever_v_clearance; // leverspace height |
84 | 85 | ||
85 | module mirrorleft() { | 86 | module mirrorleft() { |
86 | mirror([left?0:1,0,0]) children(); | 87 | mirror([left?0:1,0,0]) children(); |
87 | } | 88 | } |
88 | module place_idler() { | 89 | module place_idler() { |
89 | rotate([0,0,45]) | 90 | rotate([0,0,45]) |
90 | translate([(pulley_d+idler_d)/2,0,0]) | 91 | translate([(pulley_d+idler_d)/2,0,0]) |
91 | children(); | 92 | children(); |
92 | } | 93 | } |
93 | module finger_indent(d=lever_thickness,depth/*=1*/,r/*=15*/) { | 94 | module finger_indent(d=lever_thickness,depth/*=1*/,r/*=15*/) { |
94 | if(depth) { | 95 | if(depth) { |
95 | hh = (-4*pow(depth,2)+pow(d,2))/(8*depth); | 96 | hh = (-4*pow(depth,2)+pow(d,2))/(8*depth); |
96 | rr = depth+hh; | 97 | rr = depth+hh; |
97 | translate([0,0,hh]) sphere(r=rr,$fn=fnr*rr); | 98 | translate([0,0,hh]) sphere(r=rr,$fn=fnr*rr); |
98 | }else if(r) { | 99 | }else if(r) { |
99 | hh=sqrt(pow(r,2)-pow(d,2)/4); | 100 | hh=sqrt(pow(r,2)-pow(d,2)/4); |
100 | translate([0,0,hh]) sphere(r=r,$fn=fnr*r); | 101 | translate([0,0,hh]) sphere(r=r,$fn=fnr*r); |
101 | } | 102 | } |
102 | } | 103 | } |
103 | 104 | ||
104 | % if(vitamins) mirrorleft() { | 105 | % if(vitamins) mirrorleft() { |
105 | translate([0,0,-epsilon]) mirror([0,0,1]) cylinder(d=gearbox_d,h=1,$fn=60); | 106 | translate([0,0,-epsilon]) mirror([0,0,1]) cylinder(d=gearbox_d,h=1,$fn=60); |
106 | for(zr=[0:90:359]) rotate([0,0,zr]) translate([mount_d/2,0,0]) | 107 | for(zr=[0:90:359]) rotate([0,0,zr]) translate([mount_d/2,0,0]) |
107 | cylinder(d=mount_screw_d,h=20,$fn=30); | 108 | cylinder(d=mount_screw_d,h=20,$fn=30); |
108 | translate([0,0,-epsilon]) cylinder(d=protrusion_d,h=protrusion_h,$fn=30); | 109 | translate([0,0,-epsilon]) cylinder(d=protrusion_d,h=protrusion_h,$fn=30); |
109 | translate([0,0,protrusion_h]) { | 110 | translate([0,0,protrusion_h]) { |
110 | difference() { | 111 | difference() { |
@@ -187,142 +188,154 @@ module the_extruder( | |||
187 | // lever end | 188 | // lever end |
188 | translate([mount_d/2,0,0]) rotate([0,90,0]) { | 189 | translate([mount_d/2,0,0]) rotate([0,90,0]) { |
189 | translate([0,-longwing,lsd/2]) finger_indent(d=lever_thickness-1,r=15); | 190 | translate([0,-longwing,lsd/2]) finger_indent(d=lever_thickness-1,r=15); |
190 | translate([0,-longwing,0]) | 191 | translate([0,-longwing,0]) |
191 | mirror([0,0,1]) | 192 | mirror([0,0,1]) |
192 | difference() { | 193 | difference() { |
193 | cylinder(d=spring_d+spring_d_clearance,h=lsd,$fn=fnd*(spring_d+spring_d_clearance)); | 194 | cylinder(d=spring_d+spring_d_clearance,h=lsd,$fn=fnd*(spring_d+spring_d_clearance)); |
194 | sphere(d=spring_d*3/4,$fn=fnd*spring_d*3/4); | 195 | sphere(d=spring_d*3/4,$fn=fnd*spring_d*3/4); |
195 | } | 196 | } |
196 | }//rotate-translate | 197 | }//rotate-translate |
197 | }//difference | 198 | }//difference |
198 | // bridging patch | 199 | // bridging patch |
199 | if(bridges) place_idler() | 200 | if(bridges) place_idler() |
200 | translate([0,0,lever_thickness/2-mount_screwhead_h]) | 201 | translate([0,0,lever_thickness/2-mount_screwhead_h]) |
201 | mirror([0,0,1]) | 202 | mirror([0,0,1]) |
202 | cylinder(d=mount_screwhead_d,h=layer_height); | 203 | cylinder(d=mount_screwhead_d,h=layer_height); |
203 | }//translate | 204 | }//translate |
204 | }//lever module | 205 | }//lever module |
205 | 206 | ||
206 | module body() { | 207 | module body() { |
207 | difference() { | 208 | difference() { |
208 | union() { | 209 | union() { |
209 | cylinder(d=gearbox_d,h=body_h,$fn=fnd*gearbox_d); | 210 | cylinder(d=gearbox_d,h=body_h,$fn=fnd*gearbox_d); |
210 | // finger and spring support | 211 | // finger and spring support |
211 | fsw = gearbox_d-(gearbox_d-mount_d)/2-spring_lc; | 212 | fsw = gearbox_d-(gearbox_d-mount_d)/2-spring_lc; |
212 | translate([-gearbox_d/2,0,0]) difference() { | 213 | translate([-gearbox_d/2,0,0]) difference() { |
213 | union() { | 214 | union() { |
214 | hull() { | 215 | hull() { |
215 | translate([0,-longwing,ls_z]) | 216 | translate([0,-longwing,ls_z]) |
216 | rotate([0,90,0]) | 217 | rotate([0,90,0]) |
217 | cylinder(d=lever_thickness,h=fsw,$fn=fnd*lever_thickness); | 218 | cylinder(d=lever_thickness,h=fsw,$fn=fnd*lever_thickness); |
218 | hh=body_h-ls_z; | 219 | hh=body_h-ls_z; |
219 | translate([0,0,ls_z-lever_thickness/2]) | 220 | translate([0,0,ls_z-lever_thickness/2]) |
220 | mirror([0,1,0]) cube(size=[fsw,longwing-hh+lever_thickness/sqrt(2),hh+lever_thickness/2]); | 221 | mirror([0,1,0]) cube(size=[fsw,longwing-hh+lever_thickness/sqrt(2),hh+lever_thickness/2]); |
221 | hhh=ls_z; | 222 | hhh=ls_z; |
222 | translate([0,0,0]) | 223 | translate([0,0,0]) |
223 | mirror([0,1,0]) cube(size=[fsw,longwing-hhh+lever_thickness/sqrt(2),hhh+lever_thickness/2]); | 224 | mirror([0,1,0]) cube(size=[fsw,longwing-hhh+lever_thickness/sqrt(2),hhh+lever_thickness/2]); |
224 | } | 225 | } |
225 | } | 226 | } |
226 | translate([0,-longwing,ls_z]) rotate([0,-90,0]) { | 227 | translate([0,-longwing,ls_z]) rotate([0,-90,0]) { |
227 | if(!tensioner) finger_indent(d=lever_thickness-1,r=15); else { | 228 | if(!tensioner) finger_indent(d=lever_thickness-1,r=15); else { |
228 | mirror([0,0,1]) { | 229 | mirror([0,0,1]) { |
229 | translate([0,0,st_thickshell]) | 230 | translate([0,0,st_thickshell]) |
230 | hull() for(o=[0,spring_d]) translate([0,-o,0]) | 231 | hull() for(o=[0,spring_d]) translate([0,-o,0]) |
231 | rotate([0,0,30]) | 232 | rotate([0,0,30]) |
232 | cylinder(d=st_nut_d+st_nut_d_tolerance,h=st_nut_h+st_nut_h_tolerance,$fn=6); | 233 | cylinder(d=st_nut_d+st_nut_d_tolerance,h=st_nut_h+st_nut_h_tolerance,$fn=6); |
233 | 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)); | 234 | 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)); |
234 | bigd = spring_d+spring_d_clearance; | 235 | bigd = spring_d+spring_d_clearance; |
235 | hf = (bigd-st_screw_d-st_screw_d_tolerance)/2; | 236 | hf = (bigd-st_screw_d-st_screw_d_tolerance)/2; |
236 | translate([0,0,st_thickshell+st_nut_h+st_nut_h_tolerance+st_thinshell-epsilon]) | 237 | translate([0,0,st_thickshell+st_nut_h+st_nut_h_tolerance+st_thinshell-epsilon]) |
237 | cylinder(d1=st_screw_d+st_screw_d_tolerance,d2=bigd, | 238 | cylinder(d1=st_screw_d+st_screw_d_tolerance,d2=bigd, |
238 | h=hf+epsilon, $fn=fnd*bigd); | 239 | h=hf+epsilon, $fn=fnd*bigd); |
239 | translate([0,0,st_thickshell+st_nut_h+st_nut_h_tolerance+st_thinshell+hf-epsilon]) | 240 | translate([0,0,st_thickshell+st_nut_h+st_nut_h_tolerance+st_thinshell+hf-epsilon]) |
240 | cylinder(d=bigd,h=fsw+1,$fn=fnd*bigd); | 241 | cylinder(d=bigd,h=fsw+1,$fn=fnd*bigd); |
241 | } | 242 | } |
242 | } | 243 | } |
243 | } | 244 | } |
244 | } // translate | 245 | } // translate |
245 | 246 | ||
246 | // pushfit bracket | 247 | // pushfit bracket |
247 | translate([0,0,filament_elevation]) | 248 | translate([0,0,filament_elevation]) |
248 | rotate([0,0,45]) translate([pulley_d/2,0,0]) | 249 | rotate([0,0,45]) translate([pulley_d/2,0,0]) |
249 | rotate([-90,0,0]) | 250 | rotate([-90,0,0]) |
250 | translate([0,0,mount_d/sqrt(2)/2+mount_screw_d-gearbox_d/2/*TODO:*/]) { | 251 | translate([0,0,mount_d/sqrt(2)/2+mount_screw_d-gearbox_d/2/*TODO:*/]) { |
251 | pfb2a = pf_d(pf)+2*pf_shell; pfba = pfb2a/2; | 252 | pfbl = pf_h(pf)+gearbox_d/2; //TODO: |
252 | pfbd = pfb2a/cos(30); | 253 | if(pf_smooth) { |
253 | pfbs = pfb2a*tan(30); | 254 | pfbd = pf_d(pf)+2*pf_shell; |
254 | pfbl = pf_h(pf)+gearbox_d/2/*TODO:*/; | ||
255 | cylinder(d=pfbd,h=pfbl,$fn=6); | ||
256 | translate([-pfbs/2,0,0]) { | ||
257 | hull() { | 255 | hull() { |
258 | translate([0,-pfba,0]) cube(size=[pfbs,pfb2a,pfbl]); | 256 | cylinder(d=pfbd,h=pfbl,$fn=pfbd*fnd); |
259 | cube(size=[pfbs,filament_elevation,pfbl-filament_elevation+pfba]); | 257 | translate([-epsilon/2,0,0]) { |
260 | mirror([0,1,0]) | 258 | cube(size=[epsilon,filament_elevation,pfbl-filament_elevation+pfbd/2]); |
261 | cube(size=[pfbs,body_h-filament_elevation,pfbl-body_h+filament_elevation+pfba]); | 259 | mirror([0,1,0]) |
262 | } | 260 | cube(size=[epsilon,body_h-filament_elevation,pfbl-body_h+filament_elevation+pfbd/2]); |
263 | } | 261 | }//translate |
264 | } | 262 | }//hull |
263 | }else{ | ||
264 | pfb2a = pf_d(pf)+2*pf_shell; pfba = pfb2a/2; | ||
265 | pfbd = pfb2a/cos(30); | ||
266 | pfbs = pfb2a*tan(30); | ||
267 | cylinder(d=pfbd,h=pfbl,$fn=6); | ||
268 | translate([-pfbs/2,0,0]) { | ||
269 | hull() { | ||
270 | translate([0,-pfba,0]) cube(size=[pfbs,pfb2a,pfbl]); | ||
271 | cube(size=[pfbs,filament_elevation,pfbl-filament_elevation+pfba]); | ||
272 | mirror([0,1,0]) | ||
273 | cube(size=[pfbs,body_h-filament_elevation,pfbl-body_h+filament_elevation+pfba]); | ||
274 | }//hull | ||
275 | }//translate*/ | ||
276 | }//if(pf_smooth) | ||
277 | }//translate rotate translate rotate translate | ||
265 | }//union (first child of difference) | 278 | }//union (first child of difference) |
266 | 279 | ||
267 | // protrusion | 280 | // protrusion |
268 | translate([0,0,-1]) | 281 | translate([0,0,-1]) |
269 | cylinder(d=protrusion_d+protrusion_tolerance_h,h=protrusion_h+protrusion_tolerance_v+1,$fn=fnd*(protrusion_d+protrusion_tolerance_h)); | 282 | cylinder(d=protrusion_d+protrusion_tolerance_h,h=protrusion_h+protrusion_tolerance_v+1,$fn=fnd*(protrusion_d+protrusion_tolerance_h)); |
270 | // mount screw holes | 283 | // mount screw holes |
271 | for(zr=[0:90:359]) rotate([0,0,zr]) translate([mount_d/2,0,0]) { | 284 | for(zr=[0:90:359]) rotate([0,0,zr]) translate([mount_d/2,0,0]) { |
272 | translate([0,0,mount_screw_l-mounthole_depth/2-(bridges?layer_height:-epsilon)]) | 285 | translate([0,0,mount_screw_l-mounthole_depth/2-(bridges?layer_height:-epsilon)]) |
273 | mirror([0,0,1]) | 286 | mirror([0,0,1]) |
274 | cylinder(d=mount_screw_d+mount_screw_d_tolerance, | 287 | cylinder(d=mount_screw_d+mount_screw_d_tolerance, |
275 | h=mount_screw_l-mounthole_depth/2+1, | 288 | h=mount_screw_l-mounthole_depth/2+1, |
276 | $fn=fnd*(mount_screw_d+mount_screw_d_tolerance)); | 289 | $fn=fnd*(mount_screw_d+mount_screw_d_tolerance)); |
277 | translate([0,0,mount_screw_l-mounthole_depth/2]) | 290 | translate([0,0,mount_screw_l-mounthole_depth/2]) |
278 | cylinder(d=mount_screwhead_d,h=body_h+1,$fn=fnd*mount_screwhead_d); | 291 | cylinder(d=mount_screwhead_d,h=body_h+1,$fn=fnd*mount_screwhead_d); |
279 | }//for | 292 | }//for |
280 | // pushfit | 293 | // pushfit |
281 | translate([0,0,filament_elevation]) | 294 | translate([0,0,filament_elevation]) |
282 | rotate([0,0,45]) translate([pulley_d/2,0,0]) | 295 | rotate([0,0,45]) translate([pulley_d/2,0,0]) |
283 | rotate([-90,0,0]) | 296 | rotate([-90,0,0]) |
284 | translate([0,0,mount_d/sqrt(2)/2+mount_screw_d+epsilon]) | 297 | translate([0,0,mount_d/sqrt(2)/2+mount_screw_d+epsilon]) |
285 | rotate([0,0,180]) { | 298 | rotate([0,0,180]) { |
286 | pushfit(pf); | 299 | pushfit(pf); |
287 | cylinder(d=filament_guide_d,h=gearbox_d,center=true,$fn=fnd*filament_guide_d); | 300 | cylinder(d=filament_guide_d,h=gearbox_d,center=true,$fn=fnd*filament_guide_d); |
288 | translate([0,-filament_guide_d/2/sqrt(2),0]) | 301 | translate([0,-filament_guide_d/2/sqrt(2),0]) |
289 | rotate([0,0,45]) | 302 | rotate([0,0,45]) |
290 | cube(size=[filament_guide_d/2,filament_guide_d/2,gearbox_d],center=true); | 303 | cube(size=[filament_guide_d/2,filament_guide_d/2,gearbox_d],center=true); |
291 | }//rotate translate rotate translate rotate translate | 304 | }//rotate translate rotate translate rotate translate |
292 | // pulley | 305 | // pulley |
293 | cylinder(d=pulley_d+pulley_clearance,h=body_h+1,$fn=fnd*(pulley_d+pulley_clearance)); | 306 | cylinder(d=pulley_d+pulley_clearance,h=body_h+1,$fn=fnd*(pulley_d+pulley_clearance)); |
294 | // leverspace | 307 | // leverspace |
295 | hull() for(x=[0,gearbox_d]) | 308 | hull() for(x=[0,gearbox_d]) |
296 | rotate([0,0,45]) | 309 | rotate([0,0,45]) |
297 | translate([x,0,ls_z-ls_h/2]) | 310 | translate([x,0,ls_z-ls_h/2]) |
298 | cylinder(d=idler_d+idler_clearance,h=ls_h,$fn=fnd*(idler_d+idler_clearance)); | 311 | cylinder(d=idler_d+idler_clearance,h=ls_h,$fn=fnd*(idler_d+idler_clearance)); |
299 | 312 | ||
300 | // idler clearance | 313 | // idler clearance |
301 | a=cos(45)*(pulley_d+idler_d)/2; | 314 | a=cos(45)*(pulley_d+idler_d)/2; |
302 | b=mount_d/2-a; | 315 | b=mount_d/2-a; |
303 | x=sqrt(pow(a,2)+pow(b,2)); | 316 | x=sqrt(pow(a,2)+pow(b,2)); |
304 | translate([mount_d/2,0,ls_z]) | 317 | translate([mount_d/2,0,ls_z]) |
305 | intersection() { | 318 | intersection() { |
306 | r = x+idler_d/2+idler_clearance; | 319 | r = x+idler_d/2+idler_clearance; |
307 | cylinder(r=r,h=ls_h,center=true); | 320 | cylinder(r=r,h=ls_h,center=true); |
308 | translate([-r-1,0,-ls_h/2-1]) cube(size=[2*r+2,r+1,ls_h+2]); | 321 | translate([-r-1,0,-ls_h/2-1]) cube(size=[2*r+2,r+1,ls_h+2]); |
309 | } | 322 | } |
310 | 323 | ||
311 | // back side cutout | 324 | // back side cutout |
312 | a0 = asin((mount_screwhead_d+2*extrusion_width)/mount_d); | 325 | a0 = asin((mount_screwhead_d+2*extrusion_width)/mount_d); |
313 | a1 = atan((longwing-lever_thickness/2)/(gearbox_d/2)); | 326 | a1 = atan((longwing-lever_thickness/2)/(gearbox_d/2)); |
314 | translate([0,0,ls_z]) hull() { | 327 | translate([0,0,ls_z]) hull() { |
315 | rotate([0,0,-180+a0]) | 328 | rotate([0,0,-180+a0]) |
316 | rotate_extrude(angle=a1-a0) | 329 | rotate_extrude(angle=a1-a0) |
317 | translate([0,-ls_h/2]) | 330 | translate([0,-ls_h/2]) |
318 | square([sqrt(pow(gearbox_d/2,2)+pow(longwing-lever_thickness/2,2))+1, | 331 | square([sqrt(pow(gearbox_d/2,2)+pow(longwing-lever_thickness/2,2))+1, |
319 | ls_h]); | 332 | ls_h]); |
320 | cylinder(d=bore_d/2/*TODO:recalculate angles based on this, | 333 | cylinder(d=bore_d/2/*TODO:recalculate angles based on this, |
321 | too lazy to do that now*/, | 334 | too lazy to do that now*/, |
322 | h=ls_h,center=true); | 335 | h=ls_h,center=true); |
323 | } | 336 | } |
324 | 337 | ||
325 | rotate([0,0,-45]) | 338 | rotate([0,0,-45]) |
326 | translate([0,0,ls_z-ls_h/2]) | 339 | translate([0,0,ls_z-ls_h/2]) |
327 | cube(size=[gearbox_d,gearbox_d,lever_thickness+lever_v_clearance]); | 340 | cube(size=[gearbox_d,gearbox_d,lever_thickness+lever_v_clearance]); |
328 | translate([0,0,ls_z-ls_h/2]) { | 341 | translate([0,0,ls_z-ls_h/2]) { |