author | Michael Krelin <hacker@klever.net> | 2016-06-27 20:49:16 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2016-06-27 21:12:48 (UTC) |
commit | 5dff2bc54d97d2792efd114a4823de4163a8a473 (patch) (side-by-side diff) | |
tree | c829ea723c3dda3d627b3c2a7d9dd4ec22f483f4 | |
parent | e67233de1aac575632ecc366e3fd2a6251b50ee2 (diff) | |
download | hotendery-5dff2bc54d97d2792efd114a4823de4163a8a473.zip hotendery-5dff2bc54d97d2792efd114a4823de4163a8a473.tar.gz hotendery-5dff2bc54d97d2792efd114a4823de4163a8a473.tar.bz2 |
mold: default value for horizontal protrusion.
-rw-r--r-- | mold.scad | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1,38 +1,39 @@ module mold( size, /* mold inner size */ s=1, /* shell thickness */ - h_protrude=5, /* how far to protrude outside horizontally */ + h_protrude=-1, /* how far to protrude outside horizontally, default is size[2] */ v_protrude=10, /* and vertically */ l_intrude=0, /* how far to intrude on the left */ r_intrude=0, /* how far to intrude on the right */ f_intrude=0, /* how far to intrude on the front */ introffset, /* offset from the front of the left and right intrusions */ chamfer=1 ) { difference() { cube(size=[size[0]+2*s,size[1]+2*s,size[2]+s]); translate([s,s,s]) { hull() { translate([chamfer,0,chamfer]) cube(size=[size[0]-2*chamfer,size[1],size[2]-2*chamfer]); translate([0,chamfer,chamfer]) cube(size=[size[0],size[1]-2*chamfer,size[2]-2*chamfer]); translate([chamfer,chamfer,0]) cube(size=[size[0]-2*chamfer,size[1]-2*chamfer,size[2]+1]); } } } gw = 3*s; // guide width, in case I'll want to change it. - module trusion(in) { + h_protrude_ = h_protrude<0 ? size[2] : h_protrude; + module trusion(in,gw=gw,h_protrude=h_protrude_) { translate([-gw/2,0,s+size[2]]) union() { hull() { translate([0,0,in]) cube(size=[gw,in+s,v_protrude-in]); cube(size=[gw,s,in]); } hull() { translate([0,0,-h_protrude]) cube(size=[gw,s,v_protrude+h_protrude]); translate([0,-h_protrude,0]) cube(size=[gw,s+h_protrude,v_protrude]); } |