summaryrefslogtreecommitdiff
authorMichael Krelin <hacker@klever.net>2018-09-01 14:47:19 (UTC)
committer Michael Krelin <hacker@klever.net>2018-09-01 14:47:19 (UTC)
commit32b8dbd19b009091567d8e73636ffa50ea2d6335 (patch) (unidiff)
tree7517e7107ee512417b13d7f5e3eda9296f141ba7
parent8b0f9de8f05097c2dfa22088d187ac44aadcefc8 (diff)
downloadextrudery-32b8dbd19b009091567d8e73636ffa50ea2d6335.zip
extrudery-32b8dbd19b009091567d8e73636ffa50ea2d6335.tar.gz
extrudery-32b8dbd19b009091567d8e73636ffa50ea2d6335.tar.bz2
better calculate springpad size
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--another.scad6
1 files changed, 3 insertions, 3 deletions
diff --git a/another.scad b/another.scad
index faa41da..92187c5 100644
--- a/another.scad
+++ b/another.scad
@@ -345,115 +345,115 @@ module the_extruder(
345 cylinder(d=gearbox_d-mount_d,h=ls_h+2,center=true,$fn=fnd*(gearbox_d-mount_d)); 345 cylinder(d=gearbox_d-mount_d,h=ls_h+2,center=true,$fn=fnd*(gearbox_d-mount_d));
346 }//difference translate 346 }//difference translate
347 347
348 // spring tensioner 348 // spring tensioner
349 translate([-gearbox_d/2,-longwing,ls_z]) rotate([0,-90,0]) { 349 translate([-gearbox_d/2,-longwing,ls_z]) rotate([0,-90,0]) {
350 mirror([0,0,1]) { 350 mirror([0,0,1]) {
351 translate([0,0,st_thickshell]) 351 translate([0,0,st_thickshell])
352 hull() for(o=[0,spring_d]) translate([0,-o,0]) 352 hull() for(o=[0,spring_d]) translate([0,-o,0])
353 rotate([0,0,30]) 353 rotate([0,0,30])
354 cylinder(d=st_nut_d+st_nut_d_tolerance,h=st_nut_h+st_nut_h_tolerance,$fn=6); 354 cylinder(d=st_nut_d+st_nut_d_tolerance,h=st_nut_h+st_nut_h_tolerance,$fn=6);
355 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)); 355 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));
356 bigd = spring_d+spring_d_clearance; 356 bigd = spring_d+spring_d_clearance;
357 hf = (bigd-st_screw_d-st_screw_d_tolerance)/2; 357 hf = (bigd-st_screw_d-st_screw_d_tolerance)/2;
358 translate([0,0,st_thickshell+st_nut_h+st_nut_h_tolerance+st_thinshell-epsilon]) { 358 translate([0,0,st_thickshell+st_nut_h+st_nut_h_tolerance+st_thinshell-epsilon]) {
359 cylinder(d1=st_screw_d+st_screw_d_tolerance,d2=bigd, 359 cylinder(d1=st_screw_d+st_screw_d_tolerance,d2=bigd,
360 h=hf+epsilon, $fn=fnd*bigd); 360 h=hf+epsilon, $fn=fnd*bigd);
361 translate([0,-(st_split_w+st_split_w_tolerance)/2,0]) 361 translate([0,-(st_split_w+st_split_w_tolerance)/2,0])
362 cube(size=[body_h-ls_z+1,st_split_w+st_split_w_tolerance,fsw+1]); 362 cube(size=[body_h-ls_z+1,st_split_w+st_split_w_tolerance,fsw+1]);
363 }//translate 363 }//translate
364 translate([0,0,st_thickshell+st_nut_h+st_nut_h_tolerance+st_thinshell+hf-epsilon]) 364 translate([0,0,st_thickshell+st_nut_h+st_nut_h_tolerance+st_thinshell+hf-epsilon])
365 cylinder(d=bigd,h=fsw+1,$fn=fnd*bigd); 365 cylinder(d=bigd,h=fsw+1,$fn=fnd*bigd);
366 }//mirror 366 }//mirror
367 }//translate 367 }//translate
368 368
369 // label 369 // label
370 body_label(); 370 body_label();
371 371
372 }//difference 372 }//difference
373 373
374 }//body module 374 }//body module
375 module body_label() { 375 module body_label() {
376 if(body_label) { 376 if(body_label) {
377 label=body_label; 377 label=body_label;
378 label_thickness=body_label_thickness; 378 label_thickness=body_label_thickness;
379 label_len = len(label); 379 label_len = len(label);
380 labelspace = [gearbox_d/2-mount_screwhead_d/2-min_xy_shell,longwing-(mount_screwhead_d-st_split_w-st_split_w_tolerance)/2-2*min_xy_shell]; 380 labelspace = [gearbox_d/2-mount_screwhead_d/2-min_xy_shell,longwing-(mount_screwhead_d-st_split_w-st_split_w_tolerance)/2-2*min_xy_shell];
381 translate([0,0,body_h-label_thickness]) 381 translate([0,0,body_h-label_thickness])
382 linear_extrude(height=label_thickness+epsilon,convexity=64) 382 linear_extrude(height=label_thickness+epsilon,convexity=64)
383 translate([-mount_screwhead_d/2-min_xy_shell-labelspace.x/2,-longwing+(st_split_w+st_split_w_tolerance)/2+min_xy_shell+labelspace.y/2]) 383 translate([-mount_screwhead_d/2-min_xy_shell-labelspace.x/2,-longwing+(st_split_w+st_split_w_tolerance)/2+min_xy_shell+labelspace.y/2])
384 mirror([left?0:1,0]) 384 mirror([left?0:1,0])
385 text(text=label,size=labelspace.x/label_len,halign="center",valign="center",font="Arial Black"); 385 text(text=label,size=labelspace.x/label_len,halign="center",valign="center",font="Arial Black");
386 }else sphere(d=epsilon); // to avoid makefile breakage 386 }else sphere(d=epsilon); // to avoid makefile breakage
387 } 387 }
388 388
389 module springpad() { 389 module springpad() {
390 smalld=st_screw_d+st_screw_d_tolerance+min_xy_shell; 390 smalld=st_screw_d+st_screw_d_tolerance+min_xy_shell;
391 bigd = spring_d+spring_d_clearance/2; 391 bigd = spring_d+spring_d_clearance/2;
392 hf = (bigd-smalld)/2; 392 hf = (bigd-smalld)/2;
393 h = hf*3.5; 393 h = max(hf,fsw-st_screw_l+hf);
394 translate([-gearbox_d/2+st_thickshell+st_nut_h+st_nut_h_tolerance+st_thinshell+1,-longwing,filament_elevation]) 394 translate([-gearbox_d/2+fsw-h,-longwing,filament_elevation])
395 rotate([0,90,0]) difference() { 395 rotate([0,90,0]) difference() {
396 union() { 396 union() {
397 cylinder(d1=smalld,d2=bigd,h=hf,$fn=fnd*bigd); 397 cylinder(d1=smalld,d2=bigd,h=hf,$fn=fnd*bigd);
398 translate([0,0,hf-epsilon]) 398 translate([0,0,hf-epsilon])
399 cylinder(d=bigd,h=h-hf,$fn=fnd*bigd); 399 cylinder(d=bigd,h=h-hf,$fn=fnd*bigd);
400 translate([0,0,h]) 400 translate([0,0,h])
401 sphere(d=spring_d*3/4,$fn=fnd*spring_d*3/4); 401 sphere(d=spring_d*3/4,$fn=fnd*spring_d*3/4);
402 l = body_h-ls_z; 402 l = body_h-ls_z;
403 w = st_split_w; 403 w = st_split_w;
404 hull() translate([0,-st_split_w/2,0]) mirror([1,0,0]) { 404 hull() translate([0,-st_split_w/2,0]) mirror([1,0,0]) {
405 translate([0,0,w]) 405 translate([0,0,w])
406 cube(size=[l,st_split_w,w]); 406 cube(size=[l,st_split_w,w]);
407 cube(size=[l-w,st_split_w,2*w]); 407 cube(size=[l-w,st_split_w,2*w]);
408 } 408 }
409 } 409 }
410 translate([0,0,-epsilon]) 410 translate([0,0,-epsilon])
411 cylinder(d=st_screw_d+st_screw_d_tolerance,h=2*hf+epsilon,$fn=fnd*(st_screw_d+st_screw_d_tolerance)); 411 cylinder(d=st_screw_d+st_screw_d_tolerance,h=st_screw_l-fsw+h+2*epsilon,$fn=fnd*(st_screw_d+st_screw_d_tolerance));
412 } 412 }
413 } 413 }
414 414
415 module knob() { 415 module knob() {
416 ch = knob_indent_d/2; 416 ch = knob_indent_d/2;
417 knob_bore_l = body_h-protrusion_h-pulley_elevation-pulley_h-knob_v_clearance; 417 knob_bore_l = body_h-protrusion_h-pulley_elevation-pulley_h-knob_v_clearance;
418 translate([0,0,body_h+epsilon]) { 418 translate([0,0,body_h+epsilon]) {
419 mirror([0,0,1]) translate([0,0,-epsilon]) { 419 mirror([0,0,1]) translate([0,0,-epsilon]) {
420 difference() { 420 difference() {
421 cylinder(d=pulley_d,h=knob_bore_l,$fn=fnd*pulley_d); 421 cylinder(d=pulley_d,h=knob_bore_l,$fn=fnd*pulley_d);
422 translate([0,0,-1]) difference() { 422 translate([0,0,-1]) difference() {
423 cylinder(d=bore_d+knob_bore_d_tolerance,h=knob_bore_l+2); 423 cylinder(d=bore_d+knob_bore_d_tolerance,h=knob_bore_l+2);
424 translate([-bore_d/2-1,bore_dd-bore_d/2+knob_bore_d_tolerance/2,-1]) 424 translate([-bore_d/2-1,bore_dd-bore_d/2+knob_bore_d_tolerance/2,-1])
425 cube([bore_d+2,bore_d/2,knob_bore_l+4]); 425 cube([bore_d+2,bore_d/2,knob_bore_l+4]);
426 } 426 }
427 } 427 }
428 } 428 }
429 difference() { 429 difference() {
430 hull() { 430 hull() {
431 cylinder(d=gearbox_d-2*ch,h=knob_h,$fn=fnd*gearbox_d); 431 cylinder(d=gearbox_d-2*ch,h=knob_h,$fn=fnd*gearbox_d);
432 translate([0,0,ch]) 432 translate([0,0,ch])
433 cylinder(d=gearbox_d,h=knob_h-2*ch,$fn=fnd*gearbox_d); 433 cylinder(d=gearbox_d,h=knob_h-2*ch,$fn=fnd*gearbox_d);
434 } 434 }
435 for(a=[0:360/knob_indents:359]) rotate([0,0,a]) 435 for(a=[0:360/knob_indents:359]) rotate([0,0,a])
436 translate([0,gearbox_d/2,-1]) 436 translate([0,gearbox_d/2,-1])
437 cylinder(d=knob_indent_d,h=knob_h+2,$fn=fnd*knob_indent_d); 437 cylinder(d=knob_indent_d,h=knob_h+2,$fn=fnd*knob_indent_d);
438 translate([0,0,-body_h-epsilon]) knob_label(); 438 translate([0,0,-body_h-epsilon]) knob_label();
439 } 439 }
440 } 440 }
441 }//knob module 441 }//knob module
442 module knob_label() { 442 module knob_label() {
443 if(knob_label) { 443 if(knob_label) {
444 ll = len(knob_label); 444 ll = len(knob_label);
445 lsl = gearbox_d-knob_indent_d; 445 lsl = gearbox_d-knob_indent_d;
446 ts = knob_label_size?knob_label_size:min(lsl/ll,gearbox_d/4); 446 ts = knob_label_size?knob_label_size:min(lsl/ll,gearbox_d/4);
447 translate([0,0,body_h+epsilon+knob_h-knob_label_thickness]) 447 translate([0,0,body_h+epsilon+knob_h-knob_label_thickness])
448 linear_extrude(height=knob_label_thickness+epsilon,convexity=64) 448 linear_extrude(height=knob_label_thickness+epsilon,convexity=64)
449 mirror([left?0:1,0]) 449 mirror([left?0:1,0])
450 text(text=knob_label,size=ts,halign="center",valign="center",font="Arial Black"); 450 text(text=knob_label,size=ts,halign="center",valign="center",font="Arial Black");
451 }else sphere(d=epsilon); // to avoid makefile breakage 451 }else sphere(d=epsilon); // to avoid makefile breakage
452 } 452 }
453 453
454 module debug() { 454 module debug() {
455 difference() { 455 difference() {
456 children(); 456 children();
457 if(debug) { 457 if(debug) {
458 // spring tensioner debug cutout 458 // spring tensioner debug cutout
459 translate([-gearbox_d/2,-longwing,ls_z]) rotate([0,-90,0]) 459 translate([-gearbox_d/2,-longwing,ls_z]) rotate([0,-90,0])