1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
t = 50;
w = 20;
wi = 15;
h = 5;
d = 1;
aw = 4;
at = 5;
ad = 2;
cr = 2;
module round_corner(r, h) {
translate([-r, -r, 0])
difference() {
cube([r, r, h]);
cylinder(h=h, r=r, $fn=50);
}
}
difference() {
union() {
cube([w,t,h]);
};
union() {
// rail negative
translate([d, d, d]) cube([w-2*d,t,h-2*d]);
translate([(w-wi)/2, d, h-d]) cube([wi, t, d]);
// retainer hole
translate([(w-aw)/2, t-at-ad, 0]) cube([aw, at, 2*d]);
// round vertical corners
translate([0, 0, 0]) rotate(a=180) round_corner(r=cr, h=h);
translate([w, 0, 0]) rotate(a=270) round_corner(r=cr, h=h);
translate([w, t, 0]) rotate(a=0 ) round_corner(r=cr, h=h);
translate([0, t, 0]) rotate(a=90 ) round_corner(r=cr, h=h);
}
}
|