summaryrefslogtreecommitdiff
authorMichael Krelin <hacker@klever.net>2018-08-31 22:58:51 (UTC)
committer Michael Krelin <hacker@klever.net>2018-08-31 22:58:51 (UTC)
commit2ab4a0fa9bc9395e3d4a597f186eb565e5cd30a0 (patch) (unidiff)
treeacc8773689ad16d38c012daedb4a11998e08ccee
parent5fc39109c531d0b4c61a64f206c66e4e34befea7 (diff)
downloadextrudery-2ab4a0fa9bc9395e3d4a597f186eb565e5cd30a0.zip
extrudery-2ab4a0fa9bc9395e3d4a597f186eb565e5cd30a0.tar.gz
extrudery-2ab4a0fa9bc9395e3d4a597f186eb565e5cd30a0.tar.bz2
knob label
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--another.scad14
1 files changed, 14 insertions, 0 deletions
diff --git a/another.scad b/another.scad
index 05bfab3..49833ec 100644
--- a/another.scad
+++ b/another.scad
@@ -58,24 +58,25 @@ module the_extruder(
58 mount_screw_d_tolerance=.4, 58 mount_screw_d_tolerance=.4,
59 idler_v_tolerance=.5, 59 idler_v_tolerance=.5,
60 knob_bore_d_tolerance=.8, 60 knob_bore_d_tolerance=.8,
61 st_nut_h_tolerance=.2, 61 st_nut_h_tolerance=.2,
62 st_nut_d_tolerance=.2,/* TODO: make it st_nut_w_tolerance */ 62 st_nut_d_tolerance=.2,/* TODO: make it st_nut_w_tolerance */
63 st_screw_d_tolerance=.5, 63 st_screw_d_tolerance=.5,
64 st_split_w_tolerance = .3, 64 st_split_w_tolerance = .3,
65 65
66 min_z_shell = 4*layer_height, // the very minimal shell thickness along z-axis. 66 min_z_shell = 4*layer_height, // the very minimal shell thickness along z-axis.
67 min_xy_shell = 2*extrusion_width, 67 min_xy_shell = 2*extrusion_width,
68 68
69 body_label = "another", body_label_thickness = layer_height, 69 body_label = "another", body_label_thickness = layer_height,
70 knob_label = "another", knob_label_thickness = 2*layer_height, knob_label_size=undef,
70 71
71 what="lever", // lever|body|knob|springpad|* 72 what="lever", // lever|body|knob|springpad|*
72 left=false, 73 left=false,
73 vitamins = true, 74 vitamins = true,
74 bridges = true, 75 bridges = true,
75 debug = false, 76 debug = false,
76) { 77) {
77 fnd = 2*PI; fnr = 2*fnd; 78 fnd = 2*PI; fnr = 2*fnd;
78 function lu(m,k) = m[search([k],m)[0]][1]; 79 function lu(m,k) = m[search([k],m)[0]][1];
79 80
80 pulley_d = lu(pulley,"d"); 81 pulley_d = lu(pulley,"d");
81 pulley_h = lu(pulley,"h"); 82 pulley_h = lu(pulley,"h");
@@ -420,27 +421,39 @@ module the_extruder(
420 } 421 }
421 } 422 }
422 } 423 }
423 difference() { 424 difference() {
424 hull() { 425 hull() {
425 cylinder(d=gearbox_d-2*ch,h=knob_h,$fn=fnd*gearbox_d); 426 cylinder(d=gearbox_d-2*ch,h=knob_h,$fn=fnd*gearbox_d);
426 translate([0,0,ch]) 427 translate([0,0,ch])
427 cylinder(d=gearbox_d,h=knob_h-2*ch,$fn=fnd*gearbox_d); 428 cylinder(d=gearbox_d,h=knob_h-2*ch,$fn=fnd*gearbox_d);
428 } 429 }
429 for(a=[0:360/knob_indents:359]) rotate([0,0,a]) 430 for(a=[0:360/knob_indents:359]) rotate([0,0,a])
430 translate([0,gearbox_d/2,-1]) 431 translate([0,gearbox_d/2,-1])
431 cylinder(d=knob_indent_d,h=knob_h+2,$fn=fnd*knob_indent_d); 432 cylinder(d=knob_indent_d,h=knob_h+2,$fn=fnd*knob_indent_d);
433 translate([0,0,-body_h-epsilon]) knob_label();
432 } 434 }
433 } 435 }
434 }//knob module 436 }//knob module
437 module knob_label() {
438 if(knob_label) {
439 ll = len(knob_label);
440 lsl = gearbox_d-knob_indent_d;
441 ts = knob_label_size?knob_label_size:min(lsl/ll,gearbox_d/4);
442 translate([0,0,body_h+epsilon+knob_h-knob_label_thickness])
443 linear_extrude(height=knob_label_thickness+epsilon,convexity=64)
444 mirror([left?0:1,0])
445 text(text=knob_label,size=ts,halign="center",valign="center",font="Arial Black");
446 }
447 }
435 448
436 module debug() { 449 module debug() {
437 difference() { 450 difference() {
438 children(); 451 children();
439 if(debug) { 452 if(debug) {
440 // spring tensioner debug cutout 453 // spring tensioner debug cutout
441 translate([-gearbox_d/2,-longwing,ls_z]) rotate([0,-90,0]) 454 translate([-gearbox_d/2,-longwing,ls_z]) rotate([0,-90,0])
442 translate([0,-lever_thickness/2-1,-gearbox_d]) 455 translate([0,-lever_thickness/2-1,-gearbox_d])
443 cube(size=[body_h/2+1,lever_thickness/2+1,gearbox_d+2]); 456 cube(size=[body_h/2+1,lever_thickness/2+1,gearbox_d+2]);
444 // lever axis debug cutout 457 // lever axis debug cutout
445 translate([mount_d/2,0,-1]) 458 translate([mount_d/2,0,-1])
446 rotate([0,0,-45]) 459 rotate([0,0,-45])
@@ -466,17 +479,18 @@ module the_extruder(
466 else if(what=="body") color("yellow",0.7) body(); 479 else if(what=="body") color("yellow",0.7) body();
467 else if(what=="body.label") color("brown",0.7) body_label(); 480 else if(what=="body.label") color("brown",0.7) body_label();
468 else if(what=="knob") color("red",0.7) knob(); 481 else if(what=="knob") color("red",0.7) knob();
469 else if(what=="springpad") color("blue",0.7) springpad(); 482 else if(what=="springpad") color("blue",0.7) springpad();
470 else if(what=="both") { 483 else if(what=="both") {
471 color("green",0.7) lever(); 484 color("green",0.7) lever();
472 color("yellow",0.7) body(); 485 color("yellow",0.7) body();
473 color("brown",0.7) body_label(); 486 color("brown",0.7) body_label();
474 }else{ 487 }else{
475 color("green",0.7) lever(); 488 color("green",0.7) lever();
476 color("yellow",0.7) body(); 489 color("yellow",0.7) body();
477 color("red",0.7) knob(); 490 color("red",0.7) knob();
491 color("brown",0.7) knob_label();
478 color("blue",0.7) springpad(); 492 color("blue",0.7) springpad();
479 } 493 }
480} 494}
481 495
482the_extruder(what="*",left=false,debug=true); 496the_extruder(what="*",left=false,debug=true);