]> www.fi.muni.cz Git - things.git/commitdiff
Key buttons for Toyota Yaris
authorJan "Yenya" Kasprzak <kas@fi.muni.cz>
Mon, 24 Jun 2019 12:43:59 +0000 (14:43 +0200)
committerJan "Yenya" Kasprzak <kas@fi.muni.cz>
Mon, 24 Jun 2019 12:43:59 +0000 (14:43 +0200)
yaris-key-buttons.scad [new file with mode: 0644]

diff --git a/yaris-key-buttons.scad b/yaris-key-buttons.scad
new file mode 100644 (file)
index 0000000..a523009
--- /dev/null
@@ -0,0 +1,25 @@
+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);