summaryrefslogtreecommitdiff
authorMichael Krelin <hacker@klever.net>2018-08-10 09:42:10 (UTC)
committer Michael Krelin <hacker@klever.net>2018-08-10 09:42:10 (UTC)
commit0f096a81ab50e7dd4a9e949f7b4c49e701d3652c (patch) (unidiff)
treea09720eb2b2cb60fc3589a81f619a3ed3f4089a1
parent0c87c56ff30c8f72e6348482a95a07841ce93e10 (diff)
downloadextrudery-0f096a81ab50e7dd4a9e949f7b4c49e701d3652c.zip
extrudery-0f096a81ab50e7dd4a9e949f7b4c49e701d3652c.tar.gz
extrudery-0f096a81ab50e7dd4a9e949f7b4c49e701d3652c.tar.bz2
another: add tensioner screw tolerance
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--another.scad11
1 files changed, 6 insertions, 5 deletions
diff --git a/another.scad b/another.scad
index 7a3b0ac..da5f695 100644
--- a/another.scad
+++ b/another.scad
@@ -12,96 +12,97 @@ module the_extruder(
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 46
47 // empty spaces 47 // empty spaces
48 idler_travel = 3, // how far should idler travel when pressed 48 idler_travel = 3, // how far should idler travel when pressed
49 idler_clearance=1, 49 idler_clearance=1,
50 pulley_clearance=2, 50 pulley_clearance=2,
51 lever_v_clearance=.7, // vertical clearance for the lever 51 lever_v_clearance=.7, // vertical clearance for the lever
52 spring_d_clearance=1, 52 spring_d_clearance=1,
53 protrusion_tolerance_h=.5, // horizontal tolerance for the motor protrusion 53 protrusion_tolerance_h=.5, // horizontal tolerance for the motor protrusion
54 protrusion_tolerance_v=.5, // vertical tolerance for the motor protrusion 54 protrusion_tolerance_v=.5, // vertical tolerance for the motor protrusion
55 mount_screw_d_tolerance=.4, 55 mount_screw_d_tolerance=.4,
56 idler_v_tolerance=.5, 56 idler_v_tolerance=.5,
57 knob_bore_d_tolerance=.6, 57 knob_bore_d_tolerance=.6,
58 st_nut_h_tolerance=.2, 58 st_nut_h_tolerance=.2,
59 st_nut_d_tolerance=.2,/* TODO: make it st_nut_w_tolerance */ 59 st_nut_d_tolerance=.2,/* TODO: make it st_nut_w_tolerance */
60 st_screw_d_tolerance=.3,
60 61
61 what="lever", // lever|body|knob|springpad|* 62 what="lever", // lever|body|knob|springpad|*
62 left=false, 63 left=false,
63 vitamins = true, 64 vitamins = true,
64 supports = false, bridges = true, 65 supports = false, bridges = true,
65 tensioner = true, 66 tensioner = true,
66 debug = false 67 debug = false
67) { 68) {
68 fnd = 2*PI; fnr = 2*fnd; 69 fnd = 2*PI; fnr = 2*fnd;
69 70
70 lever_shell = mount_screwhead_h+0.5; 71 lever_shell = mount_screwhead_h+0.5;
71 lever_thickness=max(spring_d+spring_d_clearance+layer_height*8,idler_h+idler_v_tolerance+2*lever_shell); 72 lever_thickness=max(spring_d+spring_d_clearance+layer_height*8,idler_h+idler_v_tolerance+2*lever_shell);
72 lsd = idler_d-idler_clearance*2; 73 lsd = idler_d-idler_clearance*2;
73 longwing=gearbox_d/2+spring_d/2+lsd/2; 74 longwing=gearbox_d/2+spring_d/2+lsd/2;
74 h_ = (pulley_d+idler_d)/(2*sqrt(2)); 75 h_ = (pulley_d+idler_d)/(2*sqrt(2));
75 ri = sqrt( pow(h_,2) + pow(mount_d/2-h_,2) ); 76 ri = sqrt( pow(h_,2) + pow(mount_d/2-h_,2) );
76 spring_dl = idler_travel*longwing/ri; 77 spring_dl = idler_travel*longwing/ri;
77 78
78 filament_elevation=protrusion_h+pulley_elevation+teeth_elevation; 79 filament_elevation=protrusion_h+pulley_elevation+teeth_elevation;
79 ls_z = filament_elevation; // leverspace mid-z 80 ls_z = filament_elevation; // leverspace mid-z
80 body_h = max(protrusion_h+bore_l,mount_screw_l-mounthole_depth/2+mount_screwhead_h,ls_z*2); 81 body_h = max(protrusion_h+bore_l,mount_screw_l-mounthole_depth/2+mount_screwhead_h,ls_z*2);
81 ls_h = lever_thickness+lever_v_clearance; // leverspace height 82 ls_h = lever_thickness+lever_v_clearance; // leverspace height
82 83
83 module mirrorleft() { 84 module mirrorleft() {
84 mirror([left?0:1,0,0]) children(); 85 mirror([left?0:1,0,0]) children();
85 } 86 }
86 module place_idler() { 87 module place_idler() {
87 rotate([0,0,45]) 88 rotate([0,0,45])
88 translate([(pulley_d+idler_d)/2,0,0]) 89 translate([(pulley_d+idler_d)/2,0,0])
89 children(); 90 children();
90 } 91 }
91 module finger_indent(d=lever_thickness,depth/*=1*/,r/*=15*/) { 92 module finger_indent(d=lever_thickness,depth/*=1*/,r/*=15*/) {
92 if(depth) { 93 if(depth) {
93 hh = (-4*pow(depth,2)+pow(d,2))/(8*depth); 94 hh = (-4*pow(depth,2)+pow(d,2))/(8*depth);
94 rr = depth+hh; 95 rr = depth+hh;
95 translate([0,0,hh]) sphere(r=rr,$fn=fnr*rr); 96 translate([0,0,hh]) sphere(r=rr,$fn=fnr*rr);
96 }else if(r) { 97 }else if(r) {
97 hh=sqrt(pow(r,2)-pow(d,2)/4); 98 hh=sqrt(pow(r,2)-pow(d,2)/4);
98 translate([0,0,hh]) sphere(r=r,$fn=fnr*r); 99 translate([0,0,hh]) sphere(r=r,$fn=fnr*r);
99 } 100 }
100 } 101 }
101 102
102 % if(vitamins) mirrorleft() { 103 % if(vitamins) mirrorleft() {
103 translate([0,0,-epsilon]) mirror([0,0,1]) cylinder(d=gearbox_d,h=1,$fn=60); 104 translate([0,0,-epsilon]) mirror([0,0,1]) cylinder(d=gearbox_d,h=1,$fn=60);
104 for(zr=[0:90:359]) rotate([0,0,zr]) translate([mount_d/2,0,0]) 105 for(zr=[0:90:359]) rotate([0,0,zr]) translate([mount_d/2,0,0])
105 cylinder(d=mount_screw_d,h=20,$fn=30); 106 cylinder(d=mount_screw_d,h=20,$fn=30);
106 translate([0,0,-epsilon]) cylinder(d=protrusion_d,h=protrusion_h,$fn=30); 107 translate([0,0,-epsilon]) cylinder(d=protrusion_d,h=protrusion_h,$fn=30);
107 translate([0,0,protrusion_h]) { 108 translate([0,0,protrusion_h]) {
@@ -171,101 +172,101 @@ module the_extruder(
171 cylinder(d=mount_screw_d+mount_screw_d_tolerance,h=lever_thickness+2,center=true,$fn=fnd*mount_screw_d); 172 cylinder(d=mount_screw_d+mount_screw_d_tolerance,h=lever_thickness+2,center=true,$fn=fnd*mount_screw_d);
172 173
173 // lever end 174 // lever end
174 translate([mount_d/2,0,0]) rotate([0,90,0]) { 175 translate([mount_d/2,0,0]) rotate([0,90,0]) {
175 translate([0,-longwing,lsd/2]) finger_indent(d=lever_thickness-1,r=15); 176 translate([0,-longwing,lsd/2]) finger_indent(d=lever_thickness-1,r=15);
176 translate([0,-longwing,0]) 177 translate([0,-longwing,0])
177 mirror([0,0,1]) 178 mirror([0,0,1])
178 difference() { 179 difference() {
179 cylinder(d=spring_d+spring_d_clearance,h=lsd,$fn=fnd*(spring_d+spring_d_clearance)); 180 cylinder(d=spring_d+spring_d_clearance,h=lsd,$fn=fnd*(spring_d+spring_d_clearance));
180 sphere(d=spring_d*3/4,$fn=fnd*spring_d*3/4); 181 sphere(d=spring_d*3/4,$fn=fnd*spring_d*3/4);
181 } 182 }
182 }//rotate-translate 183 }//rotate-translate
183 }//difference 184 }//difference
184 // bridging patch 185 // bridging patch
185 if(bridges) place_idler() 186 if(bridges) place_idler()
186 translate([0,0,lever_thickness/2-mount_screwhead_h]) 187 translate([0,0,lever_thickness/2-mount_screwhead_h])
187 mirror([0,0,1]) 188 mirror([0,0,1])
188 cylinder(d=mount_screwhead_d,h=layer_height); 189 cylinder(d=mount_screwhead_d,h=layer_height);
189 }//translate 190 }//translate
190 }//lever module 191 }//lever module
191 192
192 module body() { 193 module body() {
193 difference() { 194 difference() {
194 union() { 195 union() {
195 cylinder(d=gearbox_d,h=body_h,$fn=fnd*gearbox_d); 196 cylinder(d=gearbox_d,h=body_h,$fn=fnd*gearbox_d);
196 // finger and spring support 197 // finger and spring support
197 fsw = gearbox_d-(gearbox_d-mount_d)/2-spring_lc; 198 fsw = gearbox_d-(gearbox_d-mount_d)/2-spring_lc;
198 translate([-gearbox_d/2,0,0]) difference() { 199 translate([-gearbox_d/2,0,0]) difference() {
199 union() { 200 union() {
200 hull() { 201 hull() {
201 translate([0,-longwing,ls_z]) 202 translate([0,-longwing,ls_z])
202 rotate([0,90,0]) 203 rotate([0,90,0])
203 cylinder(d=lever_thickness,h=fsw,$fn=fnd*lever_thickness); 204 cylinder(d=lever_thickness,h=fsw,$fn=fnd*lever_thickness);
204 hh=body_h-ls_z; 205 hh=body_h-ls_z;
205 translate([0,0,ls_z-lever_thickness/2]) 206 translate([0,0,ls_z-lever_thickness/2])
206 mirror([0,1,0]) cube(size=[fsw,longwing-hh+lever_thickness/sqrt(2),hh+lever_thickness/2]); 207 mirror([0,1,0]) cube(size=[fsw,longwing-hh+lever_thickness/sqrt(2),hh+lever_thickness/2]);
207 hhh=ls_z; 208 hhh=ls_z;
208 translate([0,0,0]) 209 translate([0,0,0])
209 mirror([0,1,0]) cube(size=[fsw,longwing-hhh+lever_thickness/sqrt(2),hhh+lever_thickness/2]); 210 mirror([0,1,0]) cube(size=[fsw,longwing-hhh+lever_thickness/sqrt(2),hhh+lever_thickness/2]);
210 } 211 }
211 } 212 }
212 translate([0,-longwing,ls_z]) rotate([0,-90,0]) { 213 translate([0,-longwing,ls_z]) rotate([0,-90,0]) {
213 if(!tensioner) finger_indent(d=lever_thickness-1,r=15); else { 214 if(!tensioner) finger_indent(d=lever_thickness-1,r=15); else {
214 mirror([0,0,1]) { 215 mirror([0,0,1]) {
215 translate([0,0,st_thickshell]) 216 translate([0,0,st_thickshell])
216 hull() for(o=[0,spring_d]) translate([0,-o,0]) 217 hull() for(o=[0,spring_d]) translate([0,-o,0])
217 rotate([0,0,30]) 218 rotate([0,0,30])
218 cylinder(d=st_nut_d+st_nut_d_tolerance,h=st_nut_h+st_nut_h_tolerance,$fn=6); 219 cylinder(d=st_nut_d+st_nut_d_tolerance,h=st_nut_h+st_nut_h_tolerance,$fn=6);
219 translate([0,0,-1]) cylinder(d=st_screw_d,h=fsw+2,$fn=fnd*st_screw_d); 220 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));
220 bigd = spring_d+spring_d_clearance; 221 bigd = spring_d+spring_d_clearance;
221 hf = (bigd-st_screw_d)/2; 222 hf = (bigd-st_screw_d-st_screw_d_tolerance)/2;
222 translate([0,0,st_thickshell+st_nut_h+st_nut_h_tolerance+st_thinshell-epsilon]) 223 translate([0,0,st_thickshell+st_nut_h+st_nut_h_tolerance+st_thinshell-epsilon])
223 cylinder(d1=st_screw_d,d2=bigd, 224 cylinder(d1=st_screw_d+st_screw_d_tolerance,d2=bigd,
224 h=hf+epsilon, $fn=fnd*bigd); 225 h=hf+epsilon, $fn=fnd*bigd);
225 translate([0,0,st_thickshell+st_nut_h+st_nut_h_tolerance+st_thinshell+hf-epsilon]) 226 translate([0,0,st_thickshell+st_nut_h+st_nut_h_tolerance+st_thinshell+hf-epsilon])
226 cylinder(d=bigd,h=fsw+1,$fn=fnd*bigd); 227 cylinder(d=bigd,h=fsw+1,$fn=fnd*bigd);
227 } 228 }
228 } 229 }
229 } 230 }
230 } // translate 231 } // translate
231 232
232 // pushfit bracket 233 // pushfit bracket
233 translate([0,0,filament_elevation]) 234 translate([0,0,filament_elevation])
234 rotate([0,0,45]) translate([pulley_d/2,0,0]) 235 rotate([0,0,45]) translate([pulley_d/2,0,0])
235 rotate([-90,0,0]) 236 rotate([-90,0,0])
236 translate([0,0,mount_d/sqrt(2)/2+mount_screw_d-gearbox_d/2/*TODO:*/]) 237 translate([0,0,mount_d/sqrt(2)/2+mount_screw_d-gearbox_d/2/*TODO:*/])
237 cylinder(r=min(body_h-filament_elevation,filament_elevation)/sin(60)-epsilon,h=pf_h(pf)+gearbox_d/2/*TODO:*/,$fn=6); 238 cylinder(r=min(body_h-filament_elevation,filament_elevation)/sin(60)-epsilon,h=pf_h(pf)+gearbox_d/2/*TODO:*/,$fn=6);
238 }//union (first child of difference) 239 }//union (first child of difference)
239 240
240 // protrusion 241 // protrusion
241 translate([0,0,-1]) 242 translate([0,0,-1])
242 cylinder(d=protrusion_d+protrusion_tolerance_h,h=protrusion_h+protrusion_tolerance_v+1,$fn=fnd*(protrusion_d+protrusion_tolerance_h)); 243 cylinder(d=protrusion_d+protrusion_tolerance_h,h=protrusion_h+protrusion_tolerance_v+1,$fn=fnd*(protrusion_d+protrusion_tolerance_h));
243 // mount screw holes 244 // mount screw holes
244 for(zr=[0:90:359]) rotate([0,0,zr]) translate([mount_d/2,0,0]) { 245 for(zr=[0:90:359]) rotate([0,0,zr]) translate([mount_d/2,0,0]) {
245 translate([0,0,mount_screw_l-mounthole_depth/2-(bridges?layer_height:-epsilon)]) 246 translate([0,0,mount_screw_l-mounthole_depth/2-(bridges?layer_height:-epsilon)])
246 mirror([0,0,1]) 247 mirror([0,0,1])
247 cylinder(d=mount_screw_d+mount_screw_d_tolerance, 248 cylinder(d=mount_screw_d+mount_screw_d_tolerance,
248 h=mount_screw_l-mounthole_depth/2+1, 249 h=mount_screw_l-mounthole_depth/2+1,
249 $fn=fnd*(mount_screw_d+mount_screw_d_tolerance)); 250 $fn=fnd*(mount_screw_d+mount_screw_d_tolerance));
250 translate([0,0,mount_screw_l-mounthole_depth/2]) 251 translate([0,0,mount_screw_l-mounthole_depth/2])
251 cylinder(d=mount_screwhead_d,h=body_h+1,$fn=fnd*mount_screwhead_d); 252 cylinder(d=mount_screwhead_d,h=body_h+1,$fn=fnd*mount_screwhead_d);
252 }//for 253 }//for
253 // pushfit 254 // pushfit
254 translate([0,0,filament_elevation]) 255 translate([0,0,filament_elevation])
255 rotate([0,0,45]) translate([pulley_d/2,0,0]) 256 rotate([0,0,45]) translate([pulley_d/2,0,0])
256 rotate([-90,0,0]) 257 rotate([-90,0,0])
257 translate([0,0,mount_d/sqrt(2)/2+mount_screw_d+epsilon]) 258 translate([0,0,mount_d/sqrt(2)/2+mount_screw_d+epsilon])
258 rotate([0,0,180]) { 259 rotate([0,0,180]) {
259 pushfit(pf); 260 pushfit(pf);
260 cylinder(d=filament_guide_d,h=gearbox_d,center=true,$fn=fnd*filament_guide_d); 261 cylinder(d=filament_guide_d,h=gearbox_d,center=true,$fn=fnd*filament_guide_d);
261 translate([0,-filament_guide_d/2/sqrt(2),0]) 262 translate([0,-filament_guide_d/2/sqrt(2),0])
262 rotate([0,0,45]) 263 rotate([0,0,45])
263 cube(size=[filament_guide_d/2,filament_guide_d/2,gearbox_d],center=true); 264 cube(size=[filament_guide_d/2,filament_guide_d/2,gearbox_d],center=true);
264 }//rotate translate rotate translate rotate translate 265 }//rotate translate rotate translate rotate translate
265 // pulley 266 // pulley
266 cylinder(d=pulley_d+pulley_clearance,h=body_h+1,$fn=fnd*(pulley_d+pulley_clearance)); 267 cylinder(d=pulley_d+pulley_clearance,h=body_h+1,$fn=fnd*(pulley_d+pulley_clearance));
267 // leverspace 268 // leverspace
268 hull() for(x=[0,gearbox_d]) 269 hull() for(x=[0,gearbox_d])
269 rotate([0,0,45]) 270 rotate([0,0,45])
270 translate([x,0,ls_z-ls_h/2]) 271 translate([x,0,ls_z-ls_h/2])
271 cylinder(d=idler_d+idler_clearance,h=ls_h,$fn=fnd*(idler_d+idler_clearance)); 272 cylinder(d=idler_d+idler_clearance,h=ls_h,$fn=fnd*(idler_d+idler_clearance));
@@ -290,110 +291,110 @@ module the_extruder(
290 translate([0,-ls_h/2]) 291 translate([0,-ls_h/2])
291 square([sqrt(pow(gearbox_d/2,2)+pow(longwing-lever_thickness/2,2))+1, 292 square([sqrt(pow(gearbox_d/2,2)+pow(longwing-lever_thickness/2,2))+1,
292 ls_h]); 293 ls_h]);
293 cylinder(d=bore_d/2/*TODO:recalculate angles based on this, 294 cylinder(d=bore_d/2/*TODO:recalculate angles based on this,
294 too lazy to do that now*/, 295 too lazy to do that now*/,
295 h=ls_h,center=true); 296 h=ls_h,center=true);
296 } 297 }
297 298
298 rotate([0,0,-45]) 299 rotate([0,0,-45])
299 translate([0,0,ls_z-ls_h/2]) 300 translate([0,0,ls_z-ls_h/2])
300 cube(size=[gearbox_d,gearbox_d,lever_thickness+lever_v_clearance]); 301 cube(size=[gearbox_d,gearbox_d,lever_thickness+lever_v_clearance]);
301 translate([0,0,ls_z-ls_h/2]) { 302 translate([0,0,ls_z-ls_h/2]) {
302 translate([mount_screwhead_d/2,0,0]) 303 translate([mount_screwhead_d/2,0,0])
303 mirror([0,1,0]) 304 mirror([0,1,0])
304 cube(size=[gearbox_d,gearbox_d/2+1,lever_thickness+lever_v_clearance]); 305 cube(size=[gearbox_d,gearbox_d/2+1,lever_thickness+lever_v_clearance]);
305 } 306 }
306 //translate([-mount_d/2,-longwing,filament_elevation]) 307 //translate([-mount_d/2,-longwing,filament_elevation])
307 if(!tensioner) /* XXX: this seems to be bullshit, but it's so old, that it's historical bullshit */ 308 if(!tensioner) /* XXX: this seems to be bullshit, but it's so old, that it's historical bullshit */
308 translate([mount_d/2,-longwing,filament_elevation]) 309 translate([mount_d/2,-longwing,filament_elevation])
309 rotate([0,-90,0]) difference() { 310 rotate([0,-90,0]) difference() {
310 cylinder(d=spring_d+spring_d_clearance,h=spring_lc+spring_dl,$fn=fnd*(spring_d+spring_d_clearance)); 311 cylinder(d=spring_d+spring_d_clearance,h=spring_lc+spring_dl,$fn=fnd*(spring_d+spring_d_clearance));
311 translate([0,0,spring_lc+spring_dl]) sphere(d=spring_d*3/4,$fn=fnd*spring_d*3/4); 312 translate([0,0,spring_lc+spring_dl]) sphere(d=spring_d*3/4,$fn=fnd*spring_d*3/4);
312 } 313 }
313 314
314 }//difference 315 }//difference
315 316
316 if(supports) intersection() { 317 if(supports) intersection() {
317 difference() { 318 difference() {
318 translate([0,0,ls_z-ls_h/2-epsilon]) 319 translate([0,0,ls_z-ls_h/2-epsilon])
319 cylinder(d=gearbox_d,h=ls_h+2*epsilon,$fn=fnd*gearbox_d); 320 cylinder(d=gearbox_d,h=ls_h+2*epsilon,$fn=fnd*gearbox_d);
320 cylinder(d=pulley_d+pulley_clearance,h=body_h+1,$fn=fnd*(pulley_d+pulley_clearance)); 321 cylinder(d=pulley_d+pulley_clearance,h=body_h+1,$fn=fnd*(pulley_d+pulley_clearance));
321 } 322 }
322 // supports 323 // supports
323 // TODO: hardcoded stuff below… 324 // TODO: hardcoded stuff below…
324 if(false) { // parallel 325 if(false) { // parallel
325 for(y=[-gearbox_d:4:gearbox_d]) 326 for(y=[-gearbox_d:4:gearbox_d])
326 translate([0,y-extrusion_width/2,0]) 327 translate([0,y-extrusion_width/2,0])
327 cube(size=[gearbox_d,extrusion_width,body_h]); 328 cube(size=[gearbox_d,extrusion_width,body_h]);
328 }else{ // radial 329 }else{ // radial
329 for(zr=[-65:(65+50)/7:50]) 330 for(zr=[-65:(65+50)/7:50])
330 rotate([0,0,zr]) translate([0,-extrusion_width/2,0]) 331 rotate([0,0,zr]) translate([0,-extrusion_width/2,0])
331 cube(size=[gearbox_d,extrusion_width,body_h]); 332 cube(size=[gearbox_d,extrusion_width,body_h]);
332 } 333 }
333 } 334 }
334 335
335 }//body module 336 }//body module
336 337
337 module springpad() { 338 module springpad() {
338 smalld=st_screw_d+2*extrusion_width; 339 smalld=st_screw_d+st_screw_d_tolerance+2*extrusion_width;
339 bigd = spring_d+spring_d_clearance/2; 340 bigd = spring_d+spring_d_clearance/2;
340 hf = (bigd-smalld)/2; 341 hf = (bigd-smalld)/2;
341 translate([-gearbox_d/2+st_thickshell+st_nut_h+st_nut_h_tolerance+st_thinshell+1,-longwing,filament_elevation]) 342 translate([-gearbox_d/2+st_thickshell+st_nut_h+st_nut_h_tolerance+st_thinshell+1,-longwing,filament_elevation])
342 rotate([0,90,0]) difference() { 343 rotate([0,90,0]) difference() {
343 union() { 344 union() {
344 cylinder(d1=smalld,d2=bigd,h=hf,$fn=fnd*bigd); 345 cylinder(d1=smalld,d2=bigd,h=hf,$fn=fnd*bigd);
345 translate([0,0,hf-epsilon]) 346 translate([0,0,hf-epsilon])
346 cylinder(d=bigd,h=hf*2,$fn=fnd*bigd); 347 cylinder(d=bigd,h=hf*2,$fn=fnd*bigd);
347 translate([0,0,3*hf]) 348 translate([0,0,3*hf])
348 sphere(d=spring_d*3/4,$fn=fnd*spring_d*3/4); 349 sphere(d=spring_d*3/4,$fn=fnd*spring_d*3/4);
349 } 350 }
350 translate([0,0,-epsilon]) 351 translate([0,0,-epsilon])
351 cylinder(d=st_screw_d,h=2*hf+epsilon,$fn=fnd*st_screw_d); 352 cylinder(d=st_screw_d+st_screw_d_tolerance,h=2*hf+epsilon,$fn=fnd*(st_screw_d+st_screw_d_tolerance));
352 } 353 }
353 } 354 }
354 355
355 module knob() { 356 module knob() {
356 ch = knob_indent_d/2; 357 ch = knob_indent_d/2;
357 translate([0,0,body_h+epsilon]) { 358 translate([0,0,body_h+epsilon]) {
358 mirror([0,0,1]) translate([0,0,-epsilon]) { 359 mirror([0,0,1]) translate([0,0,-epsilon]) {
359 difference() { 360 difference() {
360 cylinder(d=pulley_d,h=knob_bore_l,$fn=fnd*pulley_d); 361 cylinder(d=pulley_d,h=knob_bore_l,$fn=fnd*pulley_d);
361 translate([0,0,-1]) difference() { 362 translate([0,0,-1]) difference() {
362 cylinder(d=bore_d+knob_bore_d_tolerance,h=knob_bore_l+2); 363 cylinder(d=bore_d+knob_bore_d_tolerance,h=knob_bore_l+2);
363 translate([-bore_d/2-1,bore_dd-bore_d/2+knob_bore_d_tolerance/2,-1]) 364 translate([-bore_d/2-1,bore_dd-bore_d/2+knob_bore_d_tolerance/2,-1])
364 cube([bore_d+2,bore_d/2,knob_bore_l+4]); 365 cube([bore_d+2,bore_d/2,knob_bore_l+4]);
365 } 366 }
366 } 367 }
367 } 368 }
368 difference() { 369 difference() {
369 union() { 370 union() {
370 cylinder(d1=gearbox_d-2*ch,d2=gearbox_d,h=ch+epsilon,$fn=fnd*gearbox_d); 371 cylinder(d1=gearbox_d-2*ch,d2=gearbox_d,h=ch+epsilon,$fn=fnd*gearbox_d);
371 translate([0,0,ch]) 372 translate([0,0,ch])
372 cylinder(d=gearbox_d,h=knob_h-2*ch+epsilon,$fn=fnd*gearbox_d); 373 cylinder(d=gearbox_d,h=knob_h-2*ch+epsilon,$fn=fnd*gearbox_d);
373 translate([0,0,knob_h-ch]) 374 translate([0,0,knob_h-ch])
374 cylinder(d1=gearbox_d,d2=gearbox_d-2*ch,h=ch,$fn=fnd*gearbox_d); 375 cylinder(d1=gearbox_d,d2=gearbox_d-2*ch,h=ch,$fn=fnd*gearbox_d);
375 } 376 }
376 for(a=[0:360/knob_indents:359]) rotate([0,0,a]) 377 for(a=[0:360/knob_indents:359]) rotate([0,0,a])
377 translate([0,gearbox_d/2,-1]) 378 translate([0,gearbox_d/2,-1])
378 cylinder(d=knob_indent_d,h=knob_h+2,$fn=fnd*knob_indent_d); 379 cylinder(d=knob_indent_d,h=knob_h+2,$fn=fnd*knob_indent_d);
379 } 380 }
380 } 381 }
381 }//knob module 382 }//knob module
382 383
383 module debug() { 384 module debug() {
384 difference() { 385 difference() {
385 children(); 386 children();
386 if(debug) { 387 if(debug) {
387 // spring tensioner debug cutout 388 // spring tensioner debug cutout
388 if(tensioner) // TODO: collaps copypasted transformations 389 if(tensioner) // TODO: collaps copypasted transformations
389 translate([-gearbox_d/2,0,0]) 390 translate([-gearbox_d/2,0,0])
390 translate([0,-longwing,ls_z]) rotate([0,-90,0]) 391 translate([0,-longwing,ls_z]) rotate([0,-90,0])
391 translate([0,-lever_thickness/2-1,-gearbox_d]) 392 translate([0,-lever_thickness/2-1,-gearbox_d])
392 cube(size=[body_h/2+1,lever_thickness/2+1,gearbox_d+2]); 393 cube(size=[body_h/2+1,lever_thickness/2+1,gearbox_d+2]);
393 // lever axis debug cutout 394 // lever axis debug cutout
394 translate([mount_d/2,0,-1]) 395 translate([mount_d/2,0,-1])
395 rotate([0,0,-45]) 396 rotate([0,0,-45])
396 cube(size=[gearbox_d-mount_d,gearbox_d-mount_d,body_h+knob_h+2]); 397 cube(size=[gearbox_d-mount_d,gearbox_d-mount_d,body_h+knob_h+2]);
397 // idler debug cutout 398 // idler debug cutout
398 translate([0,0,ls_z]) 399 translate([0,0,ls_z])
399 place_idler() 400 place_idler()