author | Michael Krelin <hacker@klever.net> | 2016-06-27 20:49:27 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2016-06-27 21:12:48 (UTC) |
commit | 3be45f60904cb0fb1245210e87fed81e67fe94ef (patch) (unidiff) | |
tree | 9cc83991a98841ad767234286d1996e6e6ce40d6 | |
parent | 5dff2bc54d97d2792efd114a4823de4163a8a473 (diff) | |
download | hotendery-3be45f60904cb0fb1245210e87fed81e67fe94ef.zip hotendery-3be45f60904cb0fb1245210e87fed81e67fe94ef.tar.gz hotendery-3be45f60904cb0fb1245210e87fed81e67fe94ef.tar.bz2 |
mold: widen guides
-rw-r--r-- | mold.scad | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1,49 +1,49 @@ | |||
1 | module mold( | 1 | module mold( |
2 | size, /* mold inner size */ | 2 | size, /* mold inner size */ |
3 | s=1, /* shell thickness */ | 3 | s=1, /* shell thickness */ |
4 | h_protrude=-1,/* how far to protrude outside horizontally, default is size[2] */ | 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 |
11 | ) { | 11 | ) { |
12 | difference() { | 12 | difference() { |
13 | cube(size=[size[0]+2*s,size[1]+2*s,size[2]+s]); | 13 | cube(size=[size[0]+2*s,size[1]+2*s,size[2]+s]); |
14 | translate([s,s,s]) { | 14 | translate([s,s,s]) { |
15 | hull() { | 15 | hull() { |
16 | translate([chamfer,0,chamfer]) | 16 | translate([chamfer,0,chamfer]) |
17 | cube(size=[size[0]-2*chamfer,size[1],size[2]-2*chamfer]); | 17 | cube(size=[size[0]-2*chamfer,size[1],size[2]-2*chamfer]); |
18 | translate([0,chamfer,chamfer]) | 18 | translate([0,chamfer,chamfer]) |
19 | cube(size=[size[0],size[1]-2*chamfer,size[2]-2*chamfer]); | 19 | cube(size=[size[0],size[1]-2*chamfer,size[2]-2*chamfer]); |
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 = 4*s; // guide width, in case I'll want to change it. |
26 | h_protrude_ = h_protrude<0 ? size[2] : h_protrude; | 26 | h_protrude_ = h_protrude<0 ? size[2] : h_protrude; |
27 | module trusion(in,gw=gw,h_protrude=h_protrude_) { | 27 | module trusion(in,gw=gw,h_protrude=h_protrude_) { |
28 | translate([-gw/2,0,s+size[2]]) union() { | 28 | translate([-gw/2,0,s+size[2]]) union() { |
29 | hull() { | 29 | hull() { |
30 | translate([0,0,in]) | 30 | translate([0,0,in]) |
31 | cube(size=[gw,in+s,v_protrude-in]); | 31 | cube(size=[gw,in+s,v_protrude-in]); |
32 | cube(size=[gw,s,in]); | 32 | cube(size=[gw,s,in]); |
33 | } | 33 | } |
34 | hull() { | 34 | hull() { |
35 | translate([0,0,-h_protrude]) | 35 | translate([0,0,-h_protrude]) |
36 | cube(size=[gw,s,v_protrude+h_protrude]); | 36 | cube(size=[gw,s,v_protrude+h_protrude]); |
37 | translate([0,-h_protrude,0]) | 37 | translate([0,-h_protrude,0]) |
38 | cube(size=[gw,s+h_protrude,v_protrude]); | 38 | cube(size=[gw,s+h_protrude,v_protrude]); |
39 | } | 39 | } |
40 | } | 40 | } |
41 | } | 41 | } |
42 | /* frontal guide */ | 42 | /* frontal guide */ |
43 | translate([s+size[0]/2,0,]) trusion(in=f_intrude); | 43 | translate([s+size[0]/2,0,]) trusion(in=f_intrude); |
44 | /* left guide */ | 44 | /* left guide */ |
45 | translate([0,s+introffset,0]) rotate([0,0,-90]) trusion(in=l_intrude); | 45 | translate([0,s+introffset,0]) rotate([0,0,-90]) trusion(in=l_intrude); |
46 | /* right guide */ | 46 | /* right guide */ |
47 | translate([size[0]+2*s,s+introffset,0]) rotate([0,0,90]) trusion(in=r_intrude); | 47 | translate([size[0]+2*s,s+introffset,0]) rotate([0,0,90]) trusion(in=r_intrude); |
48 | } | 48 | } |
49 | /* vim:set ai sw=1: */ | 49 | /* vim:set ai sw=1: */ |