-rw-r--r-- | mold.scad | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1,10 +1,10 @@ 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 @@ -20,13 +20,14 @@ module mold( 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]); } |