1 // arcade controller thing
2 // Copyright (c) 2017 Clinton Ebadi <clinton@unknownlamer.org>
3 // GPLv3 or (at your option) any later version
4 // .. insert license text here ...
6 use <obiscad/bcube.scad>
10 module button (bezel = $button_d+4) {
23 for (x = [0, js_width], y = [0, js_height]) {
24 translate ([x, y, 0]) circle (d=bolt_d); // need slot instead
26 translate ([js_width/2, js_height/2, 0]) circle (d=center_hole_d);
28 %square ([js_width, js_height]); // not right...
34 module box_base (x_offset=0, y_offset=0, c=2) { // shitty name
35 offset (detal = c, chamfer=true) square ([panel_w+c+x_offset, panel_h+c+y_offset]);
42 // bcube parameters, clean up
46 module betterbox_walls () {
49 bcube([panel_w, panel_h, box_h-base_h], cr, cres);
50 bcube([panel_w-box_wall, panel_h-box_wall, box_h], cr, cres);
54 module betterbox_base () {
55 bcube([panel_w, panel_h, base_h], cr, cres);
61 translate ([0, 0, (box_h)/2]) betterbox_walls ();
68 linear_extrude (base_h) {
71 translate ([0, 0, base_h]) linear_extrude (box_h) {
74 translate ([box_wall/2, box_wall/2, 0])
75 box_base (x_offset=-box_wall, y_offset=-box_wall);
88 translate ([15, panel_h/2-js_height/2, 0]) panel_layout ();
92 //linear_extrude (6) panel ();
98 // http://smg.photobucket.com/user/ttooddddyy/media/neogeoMVS-4-25ver3-cpLayout.jpg.html
100 module panel_layout () {
104 %translate ([140-$button_d, $button_d+65, 0]) {
106 translate ([$button_d+10, 0, 0]) button ();
110 translate ([js_width/2+$button_d/2+63.5, js_height/2, 0]) {
112 for (i = [ 1 : 3 ]) {
113 translate ([i*($button_d+10)-5, 30, 0]) button ();