--- /dev/null
+eps = 0.01;
+infty = 100;
+
+wall = 0.8;
+bottom_h = 0.5;
+upper_h = 4.5; // mozna snizit tak o 2 mm, ale to by v jednom tl. byla dira
+
+module button(x, y, h) {
+ difference() {
+ union() {
+ translate([-x/2-wall, -y/2 - wall, 0])
+ cube([x+2*wall, y+2*wall, bottom_h]);
+ translate([-x/2, -y/2, 0])
+ cube([x, y, upper_h + bottom_h]);
+ }
+ if (h > 0)
+ translate([-x/2+wall, -y/2+wall, -eps])
+ cube([x-2*wall, y-2*wall, h+eps]);
+ }
+}
+
+
+button(7.7, 9.7, 3);
+
+translate([10, 0, 0]) button(7.3, 7.8, 0);