]> www.fi.muni.cz Git - things.git/blob - yaris-key-buttons.scad
switch holder.scad
[things.git] / yaris-key-buttons.scad
1 eps = 0.01;
2 infty = 100;
3
4 wall = 0.8;
5 bottom_h = 0.5;
6 upper_h = 4.5; // mozna snizit tak o 2 mm, ale to by v jednom tl. byla dira
7
8 module button(x, y, h) {
9         difference() {
10                 union() {
11                 translate([-x/2-wall, -y/2 - wall, 0])
12                         cube([x+2*wall, y+2*wall, bottom_h]);
13                 translate([-x/2, -y/2, 0])
14                         cube([x, y, upper_h + bottom_h]);
15                 }
16                 if (h > 0)
17                 translate([-x/2+wall, -y/2+wall, -eps])
18                         cube([x-2*wall, y-2*wall, h+eps]);
19         }
20 }
21
22
23 button(7.7, 9.7, 3);
24
25 translate([10, 0, 0]) button(7.3, 7.8, 0);