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) (side-by-side diff)
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(
mount_screw_d_tolerance=.4,
idler_v_tolerance=.5,
knob_bore_d_tolerance=.8,
st_nut_h_tolerance=.2,
st_nut_d_tolerance=.2,/* TODO: make it st_nut_w_tolerance */
st_screw_d_tolerance=.5,
st_split_w_tolerance = .3,
min_z_shell = 4*layer_height, // the very minimal shell thickness along z-axis.
min_xy_shell = 2*extrusion_width,
body_label = "another", body_label_thickness = layer_height,
+ knob_label = "another", knob_label_thickness = 2*layer_height, knob_label_size=undef,
what="lever", // lever|body|knob|springpad|*
left=false,
vitamins = true,
bridges = true,
debug = false,
) {
fnd = 2*PI; fnr = 2*fnd;
function lu(m,k) = m[search([k],m)[0]][1];
pulley_d = lu(pulley,"d");
pulley_h = lu(pulley,"h");
@@ -420,27 +421,39 @@ module the_extruder(
}
}
}
difference() {
hull() {
cylinder(d=gearbox_d-2*ch,h=knob_h,$fn=fnd*gearbox_d);
translate([0,0,ch])
cylinder(d=gearbox_d,h=knob_h-2*ch,$fn=fnd*gearbox_d);
}
for(a=[0:360/knob_indents:359]) rotate([0,0,a])
translate([0,gearbox_d/2,-1])
cylinder(d=knob_indent_d,h=knob_h+2,$fn=fnd*knob_indent_d);
+ translate([0,0,-body_h-epsilon]) knob_label();
}
}
}//knob module
+ module knob_label() {
+ if(knob_label) {
+ ll = len(knob_label);
+ lsl = gearbox_d-knob_indent_d;
+ ts = knob_label_size?knob_label_size:min(lsl/ll,gearbox_d/4);
+ translate([0,0,body_h+epsilon+knob_h-knob_label_thickness])
+ linear_extrude(height=knob_label_thickness+epsilon,convexity=64)
+ mirror([left?0:1,0])
+ text(text=knob_label,size=ts,halign="center",valign="center",font="Arial Black");
+ }
+ }
module debug() {
difference() {
children();
if(debug) {
// spring tensioner debug cutout
translate([-gearbox_d/2,-longwing,ls_z]) rotate([0,-90,0])
translate([0,-lever_thickness/2-1,-gearbox_d])
cube(size=[body_h/2+1,lever_thickness/2+1,gearbox_d+2]);
// lever axis debug cutout
translate([mount_d/2,0,-1])
rotate([0,0,-45])
@@ -466,17 +479,18 @@ module the_extruder(
else if(what=="body") color("yellow",0.7) body();
else if(what=="body.label") color("brown",0.7) body_label();
else if(what=="knob") color("red",0.7) knob();
else if(what=="springpad") color("blue",0.7) springpad();
else if(what=="both") {
color("green",0.7) lever();
color("yellow",0.7) body();
color("brown",0.7) body_label();
}else{
color("green",0.7) lever();
color("yellow",0.7) body();
color("red",0.7) knob();
+ color("brown",0.7) knob_label();
color("blue",0.7) springpad();
}
}
the_extruder(what="*",left=false,debug=true);