-rw-r--r-- | another.scad | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/another.scad b/another.scad index da5f695..7e8a45f 100644 --- a/another.scad +++ b/another.scad | |||
@@ -170,257 +170,257 @@ module the_extruder( | |||
170 | // mounting screw hole | 170 | // mounting screw hole |
171 | translate([mount_d/2,0,0]) | 171 | translate([mount_d/2,0,0]) |
172 | 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); |
173 | 173 | ||
174 | // lever end | 174 | // lever end |
175 | translate([mount_d/2,0,0]) rotate([0,90,0]) { | 175 | translate([mount_d/2,0,0]) rotate([0,90,0]) { |
176 | 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); |
177 | translate([0,-longwing,0]) | 177 | translate([0,-longwing,0]) |
178 | mirror([0,0,1]) | 178 | mirror([0,0,1]) |
179 | difference() { | 179 | difference() { |
180 | 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)); |
181 | 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); |
182 | } | 182 | } |
183 | }//rotate-translate | 183 | }//rotate-translate |
184 | }//difference | 184 | }//difference |
185 | // bridging patch | 185 | // bridging patch |
186 | if(bridges) place_idler() | 186 | if(bridges) place_idler() |
187 | translate([0,0,lever_thickness/2-mount_screwhead_h]) | 187 | translate([0,0,lever_thickness/2-mount_screwhead_h]) |
188 | mirror([0,0,1]) | 188 | mirror([0,0,1]) |
189 | cylinder(d=mount_screwhead_d,h=layer_height); | 189 | cylinder(d=mount_screwhead_d,h=layer_height); |
190 | }//translate | 190 | }//translate |
191 | }//lever module | 191 | }//lever module |
192 | 192 | ||
193 | module body() { | 193 | module body() { |
194 | difference() { | 194 | difference() { |
195 | union() { | 195 | union() { |
196 | cylinder(d=gearbox_d,h=body_h,$fn=fnd*gearbox_d); | 196 | cylinder(d=gearbox_d,h=body_h,$fn=fnd*gearbox_d); |
197 | // finger and spring support | 197 | // finger and spring support |
198 | fsw = gearbox_d-(gearbox_d-mount_d)/2-spring_lc; | 198 | fsw = gearbox_d-(gearbox_d-mount_d)/2-spring_lc; |
199 | translate([-gearbox_d/2,0,0]) difference() { | 199 | translate([-gearbox_d/2,0,0]) difference() { |
200 | union() { | 200 | union() { |
201 | hull() { | 201 | hull() { |
202 | translate([0,-longwing,ls_z]) | 202 | translate([0,-longwing,ls_z]) |
203 | rotate([0,90,0]) | 203 | rotate([0,90,0]) |
204 | cylinder(d=lever_thickness,h=fsw,$fn=fnd*lever_thickness); | 204 | cylinder(d=lever_thickness,h=fsw,$fn=fnd*lever_thickness); |
205 | hh=body_h-ls_z; | 205 | hh=body_h-ls_z; |
206 | translate([0,0,ls_z-lever_thickness/2]) | 206 | translate([0,0,ls_z-lever_thickness/2]) |
207 | 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]); |
208 | hhh=ls_z; | 208 | hhh=ls_z; |
209 | translate([0,0,0]) | 209 | translate([0,0,0]) |
210 | 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]); |
211 | } | 211 | } |
212 | } | 212 | } |
213 | translate([0,-longwing,ls_z]) rotate([0,-90,0]) { | 213 | translate([0,-longwing,ls_z]) rotate([0,-90,0]) { |
214 | if(!tensioner) finger_indent(d=lever_thickness-1,r=15); else { | 214 | if(!tensioner) finger_indent(d=lever_thickness-1,r=15); else { |
215 | mirror([0,0,1]) { | 215 | mirror([0,0,1]) { |
216 | translate([0,0,st_thickshell]) | 216 | translate([0,0,st_thickshell]) |
217 | hull() for(o=[0,spring_d]) translate([0,-o,0]) | 217 | hull() for(o=[0,spring_d]) translate([0,-o,0]) |
218 | rotate([0,0,30]) | 218 | rotate([0,0,30]) |
219 | 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); |
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 | 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)); |
221 | bigd = spring_d+spring_d_clearance; | 221 | bigd = spring_d+spring_d_clearance; |
222 | hf = (bigd-st_screw_d-st_screw_d_tolerance)/2; | 222 | hf = (bigd-st_screw_d-st_screw_d_tolerance)/2; |
223 | 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]) |
224 | cylinder(d1=st_screw_d+st_screw_d_tolerance,d2=bigd, | 224 | cylinder(d1=st_screw_d+st_screw_d_tolerance,d2=bigd, |
225 | h=hf+epsilon, $fn=fnd*bigd); | 225 | h=hf+epsilon, $fn=fnd*bigd); |
226 | 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]) |
227 | cylinder(d=bigd,h=fsw+1,$fn=fnd*bigd); | 227 | cylinder(d=bigd,h=fsw+1,$fn=fnd*bigd); |
228 | } | 228 | } |
229 | } | 229 | } |
230 | } | 230 | } |
231 | } // translate | 231 | } // translate |
232 | 232 | ||
233 | // pushfit bracket | 233 | // pushfit bracket |
234 | translate([0,0,filament_elevation]) | 234 | translate([0,0,filament_elevation]) |
235 | rotate([0,0,45]) translate([pulley_d/2,0,0]) | 235 | rotate([0,0,45]) translate([pulley_d/2,0,0]) |
236 | rotate([-90,0,0]) | 236 | rotate([-90,0,0]) |
237 | 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:*/]) |
238 | 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); |
239 | }//union (first child of difference) | 239 | }//union (first child of difference) |
240 | 240 | ||
241 | // protrusion | 241 | // protrusion |
242 | translate([0,0,-1]) | 242 | translate([0,0,-1]) |
243 | 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)); |
244 | // mount screw holes | 244 | // mount screw holes |
245 | 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]) { |
246 | 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)]) |
247 | mirror([0,0,1]) | 247 | mirror([0,0,1]) |
248 | cylinder(d=mount_screw_d+mount_screw_d_tolerance, | 248 | cylinder(d=mount_screw_d+mount_screw_d_tolerance, |
249 | h=mount_screw_l-mounthole_depth/2+1, | 249 | h=mount_screw_l-mounthole_depth/2+1, |
250 | $fn=fnd*(mount_screw_d+mount_screw_d_tolerance)); | 250 | $fn=fnd*(mount_screw_d+mount_screw_d_tolerance)); |
251 | translate([0,0,mount_screw_l-mounthole_depth/2]) | 251 | translate([0,0,mount_screw_l-mounthole_depth/2]) |
252 | 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); |
253 | }//for | 253 | }//for |
254 | // pushfit | 254 | // pushfit |
255 | translate([0,0,filament_elevation]) | 255 | translate([0,0,filament_elevation]) |
256 | rotate([0,0,45]) translate([pulley_d/2,0,0]) | 256 | rotate([0,0,45]) translate([pulley_d/2,0,0]) |
257 | rotate([-90,0,0]) | 257 | rotate([-90,0,0]) |
258 | 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]) |
259 | rotate([0,0,180]) { | 259 | rotate([0,0,180]) { |
260 | pushfit(pf); | 260 | pushfit(pf); |
261 | 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); |
262 | translate([0,-filament_guide_d/2/sqrt(2),0]) | 262 | translate([0,-filament_guide_d/2/sqrt(2),0]) |
263 | rotate([0,0,45]) | 263 | rotate([0,0,45]) |
264 | 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); |
265 | }//rotate translate rotate translate rotate translate | 265 | }//rotate translate rotate translate rotate translate |
266 | // pulley | 266 | // pulley |
267 | 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)); |
268 | // leverspace | 268 | // leverspace |
269 | hull() for(x=[0,gearbox_d]) | 269 | hull() for(x=[0,gearbox_d]) |
270 | rotate([0,0,45]) | 270 | rotate([0,0,45]) |
271 | translate([x,0,ls_z-ls_h/2]) | 271 | translate([x,0,ls_z-ls_h/2]) |
272 | 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)); |
273 | 273 | ||
274 | // idler clearance | 274 | // idler clearance |
275 | a=cos(45)*(pulley_d+idler_d)/2; | 275 | a=cos(45)*(pulley_d+idler_d)/2; |
276 | b=mount_d/2-a; | 276 | b=mount_d/2-a; |
277 | x=sqrt(pow(a,2)+pow(b,2)); | 277 | x=sqrt(pow(a,2)+pow(b,2)); |
278 | translate([mount_d/2,0,ls_z]) | 278 | translate([mount_d/2,0,ls_z]) |
279 | intersection() { | 279 | intersection() { |
280 | r = x+idler_d/2+idler_clearance; | 280 | r = x+idler_d/2+idler_clearance; |
281 | cylinder(r=r,h=ls_h,center=true); | 281 | cylinder(r=r,h=ls_h,center=true); |
282 | translate([-r-1,0,-ls_h/2-1]) cube(size=[2*r+2,r+1,ls_h+2]); | 282 | translate([-r-1,0,-ls_h/2-1]) cube(size=[2*r+2,r+1,ls_h+2]); |
283 | } | 283 | } |
284 | 284 | ||
285 | // back side cutout | 285 | // back side cutout |
286 | a0 = asin((mount_screwhead_d+2*extrusion_width)/mount_d); | 286 | a0 = asin((mount_screwhead_d+2*extrusion_width)/mount_d); |
287 | a1 = atan((longwing-lever_thickness/2)/(gearbox_d/2)); | 287 | a1 = atan((longwing-lever_thickness/2)/(gearbox_d/2)); |
288 | translate([0,0,ls_z]) hull() { | 288 | translate([0,0,ls_z]) hull() { |
289 | rotate([0,0,-180+a0]) | 289 | rotate([0,0,-180+a0]) |
290 | rotate_extrude(angle=a1-a0) | 290 | rotate_extrude(angle=a1-a0) |
291 | translate([0,-ls_h/2]) | 291 | translate([0,-ls_h/2]) |
292 | 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, |
293 | ls_h]); | 293 | ls_h]); |
294 | cylinder(d=bore_d/2/*TODO:recalculate angles based on this, | 294 | cylinder(d=bore_d/2/*TODO:recalculate angles based on this, |
295 | too lazy to do that now*/, | 295 | too lazy to do that now*/, |
296 | h=ls_h,center=true); | 296 | h=ls_h,center=true); |
297 | } | 297 | } |
298 | 298 | ||
299 | rotate([0,0,-45]) | 299 | rotate([0,0,-45]) |
300 | translate([0,0,ls_z-ls_h/2]) | 300 | translate([0,0,ls_z-ls_h/2]) |
301 | cube(size=[gearbox_d,gearbox_d,lever_thickness+lever_v_clearance]); | 301 | cube(size=[gearbox_d,gearbox_d,lever_thickness+lever_v_clearance]); |
302 | translate([0,0,ls_z-ls_h/2]) { | 302 | translate([0,0,ls_z-ls_h/2]) { |
303 | translate([mount_screwhead_d/2,0,0]) | 303 | translate([mount_screwhead_d/2,0,0]) |
304 | mirror([0,1,0]) | 304 | mirror([0,1,0]) |
305 | 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]); |
306 | } | 306 | } |
307 | //translate([-mount_d/2,-longwing,filament_elevation]) | 307 | //translate([-mount_d/2,-longwing,filament_elevation]) |
308 | 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 */ |
309 | translate([mount_d/2,-longwing,filament_elevation]) | 309 | translate([mount_d/2,-longwing,filament_elevation]) |
310 | rotate([0,-90,0]) difference() { | 310 | rotate([0,-90,0]) difference() { |
311 | 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)); |
312 | 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); |
313 | } | 313 | } |
314 | 314 | ||
315 | }//difference | 315 | }//difference |
316 | 316 | ||
317 | if(supports) intersection() { | 317 | if(supports) intersection() { |
318 | difference() { | 318 | difference() { |
319 | translate([0,0,ls_z-ls_h/2-epsilon]) | 319 | translate([0,0,ls_z-ls_h/2-epsilon]) |
320 | 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); |
321 | 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)); |
322 | } | 322 | } |
323 | // supports | 323 | // supports |
324 | // TODO: hardcoded stuff below… | 324 | // TODO: hardcoded stuff below… |
325 | if(false) { // parallel | 325 | if(false) { // parallel |
326 | for(y=[-gearbox_d:4:gearbox_d]) | 326 | for(y=[-gearbox_d:4:gearbox_d]) |
327 | translate([0,y-extrusion_width/2,0]) | 327 | translate([0,y-extrusion_width/2,0]) |
328 | cube(size=[gearbox_d,extrusion_width,body_h]); | 328 | cube(size=[gearbox_d,extrusion_width,body_h]); |
329 | }else{ // radial | 329 | }else{ // radial |
330 | for(zr=[-65:(65+50)/7:50]) | 330 | for(zr=[-65:(65+50)/7:50]) |
331 | rotate([0,0,zr]) translate([0,-extrusion_width/2,0]) | 331 | rotate([0,0,zr]) translate([0,-extrusion_width/2,0]) |
332 | cube(size=[gearbox_d,extrusion_width,body_h]); | 332 | cube(size=[gearbox_d,extrusion_width,body_h]); |
333 | } | 333 | } |
334 | } | 334 | } |
335 | 335 | ||
336 | }//body module | 336 | }//body module |
337 | 337 | ||
338 | module springpad() { | 338 | module springpad() { |
339 | smalld=st_screw_d+st_screw_d_tolerance+2*extrusion_width; | 339 | smalld=st_screw_d+st_screw_d_tolerance+2*extrusion_width; |
340 | bigd = spring_d+spring_d_clearance/2; | 340 | bigd = spring_d+spring_d_clearance/2; |
341 | hf = (bigd-smalld)/2; | 341 | hf = (bigd-smalld)/2; |
342 | 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]) |
343 | rotate([0,90,0]) difference() { | 343 | rotate([0,90,0]) difference() { |
344 | union() { | 344 | union() { |
345 | cylinder(d1=smalld,d2=bigd,h=hf,$fn=fnd*bigd); | 345 | cylinder(d1=smalld,d2=bigd,h=hf,$fn=fnd*bigd); |
346 | translate([0,0,hf-epsilon]) | 346 | translate([0,0,hf-epsilon]) |
347 | cylinder(d=bigd,h=hf*2,$fn=fnd*bigd); | 347 | cylinder(d=bigd,h=hf*2,$fn=fnd*bigd); |
348 | translate([0,0,3*hf]) | 348 | translate([0,0,3*hf]) |
349 | 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); |
350 | } | 350 | } |
351 | translate([0,0,-epsilon]) | 351 | translate([0,0,-epsilon]) |
352 | cylinder(d=st_screw_d+st_screw_d_tolerance,h=2*hf+epsilon,$fn=fnd*(st_screw_d+st_screw_d_tolerance)); | 352 | cylinder(d=st_screw_d+st_screw_d_tolerance,h=2*hf+epsilon,$fn=fnd*(st_screw_d+st_screw_d_tolerance)); |
353 | } | 353 | } |
354 | } | 354 | } |
355 | 355 | ||
356 | module knob() { | 356 | module knob() { |
357 | ch = knob_indent_d/2; | 357 | ch = knob_indent_d/2; |
358 | translate([0,0,body_h+epsilon]) { | 358 | translate([0,0,body_h+epsilon]) { |
359 | mirror([0,0,1]) translate([0,0,-epsilon]) { | 359 | mirror([0,0,1]) translate([0,0,-epsilon]) { |
360 | difference() { | 360 | difference() { |
361 | 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); |
362 | translate([0,0,-1]) difference() { | 362 | translate([0,0,-1]) difference() { |
363 | 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); |
364 | 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]) |
365 | cube([bore_d+2,bore_d/2,knob_bore_l+4]); | 365 | cube([bore_d+2,bore_d/2,knob_bore_l+4]); |
366 | } | 366 | } |
367 | } | 367 | } |
368 | } | 368 | } |
369 | difference() { | 369 | difference() { |
370 | union() { | 370 | union() { |
371 | 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); |
372 | translate([0,0,ch]) | 372 | translate([0,0,ch]) |
373 | 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); |
374 | translate([0,0,knob_h-ch]) | 374 | translate([0,0,knob_h-ch]) |
375 | 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); |
376 | } | 376 | } |
377 | for(a=[0:360/knob_indents:359]) rotate([0,0,a]) | 377 | for(a=[0:360/knob_indents:359]) rotate([0,0,a]) |
378 | translate([0,gearbox_d/2,-1]) | 378 | translate([0,gearbox_d/2,-1]) |
379 | 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); |
380 | } | 380 | } |
381 | } | 381 | } |
382 | }//knob module | 382 | }//knob module |
383 | 383 | ||
384 | module debug() { | 384 | module debug() { |
385 | difference() { | 385 | difference() { |
386 | children(); | 386 | children(); |
387 | if(debug) { | 387 | if(debug) { |
388 | // spring tensioner debug cutout | 388 | // spring tensioner debug cutout |
389 | if(tensioner) // TODO: collaps copypasted transformations | 389 | if(tensioner) // TODO: collaps copypasted transformations |
390 | translate([-gearbox_d/2,0,0]) | 390 | translate([-gearbox_d/2,0,0]) |
391 | translate([0,-longwing,ls_z]) rotate([0,-90,0]) | 391 | translate([0,-longwing,ls_z]) rotate([0,-90,0]) |
392 | translate([0,-lever_thickness/2-1,-gearbox_d]) | 392 | translate([0,-lever_thickness/2-1,-gearbox_d]) |
393 | 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]); |
394 | // lever axis debug cutout | 394 | // lever axis debug cutout |
395 | translate([mount_d/2,0,-1]) | 395 | translate([mount_d/2,0,-1]) |
396 | rotate([0,0,-45]) | 396 | rotate([0,0,-45]) |
397 | 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]); |
398 | // idler debug cutout | 398 | // idler debug cutout |
399 | translate([0,0,ls_z]) | 399 | translate([0,0,ls_z]) |
400 | place_idler() | 400 | place_idler() |
401 | rotate([0,0,-45]) | 401 | rotate([0,0,-45]) |
402 | translate([0,0,-lever_thickness/2-epsilon]) | 402 | translate([0,0,-lever_thickness/2-epsilon]) |
403 | cube(size=[(idler_d+idler_clearance)/2,(idler_d+idler_clearance)/2, | 403 | cube(size=[(idler_d+idler_clearance)/2,(idler_d+idler_clearance)/2, |
404 | lever_thickness+2*epsilon]); | 404 | lever_thickness+2*epsilon]); |
405 | }//if debug | 405 | }//if debug |
406 | }//difference | 406 | }//difference |
407 | } | 407 | } |
408 | 408 | ||
409 | mirrorleft() | 409 | mirrorleft() |
410 | debug() | 410 | debug() |
411 | if(what=="lever") color("green",0.7) lever(); | 411 | if(what=="lever") color("green",0.7) lever(); |
412 | else if(what=="body") color("yellow",0.7) body(); | 412 | else if(what=="body") color("yellow",0.7) body(); |
413 | else if(what=="knob") color("red",0.7) knob(); | 413 | else if(what=="knob") color("red",0.7) knob(); |
414 | else if(what=="springpad") color("blue",0.7) springpad(); | 414 | else if(what=="springpad") color("blue",0.7) springpad(); |
415 | else if(what=="both") { | 415 | else if(what=="both") { |
416 | color("green",0.7) lever(); | 416 | color("green",0.7) lever(); |
417 | color("yellow",0.7) body(); | 417 | color("yellow",0.7) body(); |
418 | }else{ | 418 | }else{ |
419 | color("green",0.7) lever(); | 419 | color("green",0.7) lever(); |
420 | color("yellow",0.7) body(); | 420 | color("yellow",0.7) body(); |
421 | color("red",0.7) knob(); | 421 | color("red",0.7) knob(); |
422 | color("blue",0.7) springpad(); | 422 | color("blue",0.7) springpad(); |
423 | } | 423 | } |
424 | } | 424 | } |
425 | 425 | ||
426 | the_extruder(what="both",left=false); | 426 | the_extruder(what="*",left=false,debug=true); |