tick = 2.54; // hole spacing x0 = 3; // hole 1 position relative to main faceplate y0 = 15; // hole 1 position relative to main faceplate hh = 4; // hole height m3 = 4; // diameter of M3 bolt hole button = 12.5; // diameter of button hole led = 5.8; // diameter of LED hole leg = 8.5; // leg height difference() { cube([85,118,1.8]); // main faceplate translate([x0+tick,y0,0]) cylinder(hh,d=m3); // mount hole - bottom left translate([x0+tick*30,y0,0]) cylinder(hh,d=m3); // mount hole - bottom right translate([x0+tick,y0+tick*37,0]) cylinder(hh,d=m3); // mount hole - top left translate([x0+tick*30,y0+tick*37,0]) cylinder(hh,d=m3); // mount hole - top right translate([x0+tick*3,y0+tick*3.5,0]) cylinder(hh,d=button); // white button translate([x0+tick*9,y0+tick*3.5,0]) cylinder(hh,d=button); // black button translate([x0+tick*16,y0,0]) cube([28,23,hh]); // joystick translate([69,y0,0]) cylinder(1.6,d=6); // joystick bolt translate([x0+tick*15,y0+tick*14,0]) cube([31,15,hh]); // LED display translate([x0+31+tick*15,y0+1+tick*14,0]) cube([10,13,1.6]); // LED display leads translate([x0+1+tick*3,y0+tick*20,0]) cube([17,4,hh]); // programming headers translate([x0+1+3+tick*3,y0+tick*14,0]) cube([11,1.8,hh]); // vents translate([x0+1+3+tick*3,y0+tick*12.5,0]) cube([11,1.8,hh]); // vents translate([x0+tick*18,y0+tick*25.5,0]) cylinder(hh,d=button); // yellow button translate([x0+tick*24,y0+tick*25.5,0]) cylinder(hh,d=button); // red button translate([x0+tick*17,y0+tick*32,0]) cylinder(hh,d=led); // power LED translate([0,y0+tick*24,0]) cube([10,15,hh]); // SD card translate([x0+tick*11.5,y0+tick*35,0]) cube([6,6,hh]); // IR receiver translate([x0+1+tick*1.5,y0+tick*33,0]) cube([9.5,20,hh]); // power jack //translate([0,54,0]) cube(85,80,hh); // test block one //translate([0,0,0]) cube([85,48,hh]); // test block two } // Potentiometer holder difference() { translate([85,y0,0]) cube([21,23,1.8]); translate([85+10,y0+11.5,0]) cylinder(hh,d=7.6); translate([85+10-1.5,y0+11.5+.6+3.5+3,0]) cube([3,1.2,hh]); } translate([85,y0,-leg]) cube([21,2,leg]); translate([85,y0+21,-leg]) cube([21,2,leg]); translate([104,y0,-leg]) cube([2,23,leg]); // Legs difference() { translate([0,0,-leg]) cube([10,17,leg]); translate([x0+tick,y0,-leg]) cylinder(leg+hh,d=m3); } difference() { translate([75,0,-leg]) cube([10,18,leg]); translate([x0+tick*30,y0,-leg]) cylinder(leg+hh,d=m3); } difference() { translate([0,93,-leg]) cube([x0+1+tick*1.5,25,leg]); translate([x0+tick,y0+tick*37,-leg]) cylinder(leg+hh,d=m3); } difference() { translate([75,104,-leg]) cube([10,14,leg]); translate([x0+tick*30,y0+tick*37,-leg]) cylinder(leg+hh,d=m3); } // Sides translate([0,0,-leg]) cube([85,3,leg]); // bottom translate([x0+1+tick*1.5+9.5,114,-leg]) cube([65,4,leg]); // top translate([0,0,-leg]) cube([2,72,leg]); // left translate([83,y0+21,-leg]) cube([2,35,leg]);