summaryrefslogtreecommitdiff
authorMichael Krelin <hacker@klever.net>2018-08-31 22:20:06 (UTC)
committer Michael Krelin <hacker@klever.net>2018-08-31 22:20:06 (UTC)
commit875ceca4d231a22423c42d44d8d14e02d3b4ef37 (patch) (side-by-side diff)
treedc2240e3696adcbc41512a7659bf6066a3bd2246
parent428ea05af148a788e379a9b84a31c6322271cf37 (diff)
downloadextrudery-875ceca4d231a22423c42d44d8d14e02d3b4ef37.zip
extrudery-875ceca4d231a22423c42d44d8d14e02d3b4ef37.tar.gz
extrudery-875ceca4d231a22423c42d44d8d14e02d3b4ef37.tar.bz2
body label and thickness as parameters
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--another.scad11
1 files changed, 6 insertions, 5 deletions
diff --git a/another.scad b/another.scad
index fcd179e..f01e765 100644
--- a/another.scad
+++ b/another.scad
@@ -57,30 +57,31 @@ module the_extruder(
protrusion_tolerance_v=.5, // vertical tolerance for the motor protrusion
mount_screw_d_tolerance=.4,
idler_v_tolerance=.5,
knob_bore_d_tolerance=.6,
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 = 2*layer_height,
+
what="lever", // lever|body|knob|springpad|*
left=false,
vitamins = true,
bridges = true,
debug = false,
- label = "another"
) {
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");
teeth_elevation = lu(pulley,"fe");
filament_offset = lu(pulley,"g")+filament_d/2;
pulley_d_clearance = lu(pulley,"ssrc")*2;
idler_filament_offset = filament_path_d/2;
lever_shell = mount_screwhead_h+0.5;
@@ -351,34 +352,34 @@ module the_extruder(
translate([0,0,st_thickshell+st_nut_h+st_nut_h_tolerance+st_thinshell-epsilon]) {
cylinder(d1=st_screw_d+st_screw_d_tolerance,d2=bigd,
h=hf+epsilon, $fn=fnd*bigd);
translate([0,-(st_split_w+st_split_w_tolerance)/2,0])
cube(size=[body_h-ls_z+1,st_split_w+st_split_w_tolerance,fsw+1]);
}//translate
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
- label_thickness = 2*layer_height;
- label_len = len(label);
- if(label_len) {
+ 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(label_len)
+ }//if(body_label)
}//difference
}//body module
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;
translate([-gearbox_d/2+st_thickshell+st_nut_h+st_nut_h_tolerance+st_thinshell+1,-longwing,filament_elevation])
rotate([0,90,0]) difference() {