summaryrefslogtreecommitdiff
path: root/another.scad
authorMichael Krelin <hacker@klever.net>2018-08-31 22:28:17 (UTC)
committer Michael Krelin <hacker@klever.net>2018-08-31 22:28:17 (UTC)
commit1204538201ab6005f99507a511ffc17050194c8e (patch) (side-by-side diff)
tree0a9b2a99252714f2cfafbf97e87b8b0e0700bcd8 /another.scad
parent875ceca4d231a22423c42d44d8d14e02d3b4ef37 (diff)
downloadextrudery-1204538201ab6005f99507a511ffc17050194c8e.zip
extrudery-1204538201ab6005f99507a511ffc17050194c8e.tar.gz
extrudery-1204538201ab6005f99507a511ffc17050194c8e.tar.bz2
body label as a separate STL
Diffstat (limited to 'another.scad') (more/less context) (ignore whitespace changes)
-rw-r--r--another.scad26
1 files changed, 16 insertions, 10 deletions
diff --git a/another.scad b/another.scad
index f01e765..3955e49 100644
--- a/another.scad
+++ b/another.scad
@@ -358,26 +358,30 @@ module the_extruder(
translate([0,0,st_thickshell+st_nut_h+st_nut_h_tolerance+st_thinshell+hf-epsilon])
cylinder(d=bigd,h=fsw+1,$fn=fnd*bigd);
}//mirror
}//translate
// label
- if(body_label) let(label=body_label,label_thickness=body_label_thickness) {
- label_thickness = 2*layer_height;
- label_len = len(label);
- 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];
- translate([0,0,body_h-label_thickness])
- linear_extrude(height=label_thickness+epsilon,convexity=64)
- 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])
- mirror([left?0:1,0])
- text(text=label,size=labelspace.x/label_len,halign="center",valign="center",font="Arial Black");
- }//if(body_label)
+ body_label();
}//difference
}//body module
+ module body_label() {
+ if(body_label) {
+ label=body_label;
+ label_thickness=body_label_thickness;
+ label_len = len(label);
+ 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];
+ translate([0,0,body_h-label_thickness])
+ linear_extrude(height=label_thickness+epsilon,convexity=64)
+ 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])
+ mirror([left?0:1,0])
+ text(text=label,size=labelspace.x/label_len,halign="center",valign="center",font="Arial Black");
+ }//if(body_label)
+ }
module springpad() {
smalld=st_screw_d+st_screw_d_tolerance+min_xy_shell;
bigd = spring_d+spring_d_clearance/2;
hf = (bigd-smalld)/2;
h = hf*3.5;
@@ -458,17 +462,19 @@ module the_extruder(
}
mirrorleft()
debug()
if(what=="lever") color("green",0.7) lever();
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("blue",0.7) springpad();
}