author | Michael Krelin <hacker@klever.net> | 2018-08-31 22:58:51 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2018-08-31 22:58:51 (UTC) |
commit | 2ab4a0fa9bc9395e3d4a597f186eb565e5cd30a0 (patch) (unidiff) | |
tree | acc8773689ad16d38c012daedb4a11998e08ccee | |
parent | 5fc39109c531d0b4c61a64f206c66e4e34befea7 (diff) | |
download | extrudery-2ab4a0fa9bc9395e3d4a597f186eb565e5cd30a0.zip extrudery-2ab4a0fa9bc9395e3d4a597f186eb565e5cd30a0.tar.gz extrudery-2ab4a0fa9bc9395e3d4a597f186eb565e5cd30a0.tar.bz2 |
knob label
-rw-r--r-- | another.scad | 14 |
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 | |||
@@ -67,6 +67,7 @@ module the_extruder( | |||
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, |
@@ -429,9 +430,21 @@ module the_extruder( | |||
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() { |
@@ -475,6 +488,7 @@ module the_extruder( | |||
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 | } |