summaryrefslogtreecommitdiff
authorMichael Krelin <hacker@klever.net>2016-06-27 20:49:16 (UTC)
committer Michael Krelin <hacker@klever.net>2016-06-27 21:12:48 (UTC)
commit5dff2bc54d97d2792efd114a4823de4163a8a473 (patch) (unidiff)
treec829ea723c3dda3d627b3c2a7d9dd4ec22f483f4
parente67233de1aac575632ecc366e3fd2a6251b50ee2 (diff)
downloadhotendery-5dff2bc54d97d2792efd114a4823de4163a8a473.zip
hotendery-5dff2bc54d97d2792efd114a4823de4163a8a473.tar.gz
hotendery-5dff2bc54d97d2792efd114a4823de4163a8a473.tar.bz2
mold: default value for horizontal protrusion.
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--mold.scad5
1 files changed, 3 insertions, 2 deletions
diff --git a/mold.scad b/mold.scad
index d5354b0..e4f93fc 100644
--- a/mold.scad
+++ b/mold.scad
@@ -1,10 +1,10 @@
1module mold( 1module mold(
2 size, /* mold inner size */ 2 size, /* mold inner size */
3 s=1, /* shell thickness */ 3 s=1, /* shell thickness */
4 h_protrude=5,/* how far to protrude outside horizontally */ 4 h_protrude=-1,/* how far to protrude outside horizontally, default is size[2] */
5 v_protrude=10,/* and vertically */ 5 v_protrude=10,/* and vertically */
6 l_intrude=0,/* how far to intrude on the left */ 6 l_intrude=0,/* how far to intrude on the left */
7 r_intrude=0,/* how far to intrude on the right */ 7 r_intrude=0,/* how far to intrude on the right */
8 f_intrude=0,/* how far to intrude on the front */ 8 f_intrude=0,/* how far to intrude on the front */
9 introffset,/* offset from the front of the left and right intrusions */ 9 introffset,/* offset from the front of the left and right intrusions */
10 chamfer=1 10 chamfer=1
@@ -20,13 +20,14 @@ module mold(
20 translate([chamfer,chamfer,0]) 20 translate([chamfer,chamfer,0])
21 cube(size=[size[0]-2*chamfer,size[1]-2*chamfer,size[2]+1]); 21 cube(size=[size[0]-2*chamfer,size[1]-2*chamfer,size[2]+1]);
22 } 22 }
23 } 23 }
24 } 24 }
25 gw = 3*s; // guide width, in case I'll want to change it. 25 gw = 3*s; // guide width, in case I'll want to change it.
26 module trusion(in) { 26 h_protrude_ = h_protrude<0 ? size[2] : h_protrude;
27 module trusion(in,gw=gw,h_protrude=h_protrude_) {
27 translate([-gw/2,0,s+size[2]]) union() { 28 translate([-gw/2,0,s+size[2]]) union() {
28 hull() { 29 hull() {
29 translate([0,0,in]) 30 translate([0,0,in])
30 cube(size=[gw,in+s,v_protrude-in]); 31 cube(size=[gw,in+s,v_protrude-in]);
31 cube(size=[gw,s,in]); 32 cube(size=[gw,s,in]);
32 } 33 }