1 // simple spinner control for a 5 3/8 inch by 8 1/2 inch project box
2 // from the craft store.
5 panel_height = (5 + 1/2) * 25.4;
6 panel_width = (8 + 5/8) * 25.4;
11 button_d = (1 + 1/8) * 25.4;
12 button_spacing = 36; // based on https://www.slagcoin.com/joystick/layout.html
15 module line (pos0, pos1, width=0.5) {
17 translate (pos0) circle (width);
18 translate (pos1) circle (width);
22 module button (bezel = $button_d+4, lines=true) {
24 line ([-bezel/2, 0], [bezel/2, 0]);
25 line ([0, -bezel/2], [0, bezel/2]);
30 circle (d=$button_d-2);
32 circle (d = $button_d/4);
36 module panel_layout () {
38 translate ([panel_width/5, panel_height/2]) {
39 translate ([0, 0]) button ();
40 translate ([button_spacing, -button_spacing/2]) button ();
44 translate ([panel_width-panel_width/5, panel_height-panel_height/4]) {
45 translate ([0, 0]) button ();
51 module panel_outline () {
53 square ([panel_width, panel_height]);
54 translate ([wall_width/2, wall_width/2]) square ([panel_width-wall_width, panel_height-wall_width]);
65 // centering aid for drilling pilot hole
67 module template_button (bezel = $button_d+4) {
75 //linear_extrude (3) template_button ($fa=0.1, $fs=0.1);