/* a box divided on layers, 4 long screws at the corners to keep it together, alignment pins between layers * top, big hole for the screen and small holes for air * board, holds the board and the switch / button / usb / sd holes on the sides; the co2 sensor probably goes here as well * bottom, for battery and pm sensor */ DISPLAY_WIN_X=51; DISPLAY_WIN_Y=26; DISPLAY_OFF_X=16; DISPLAY_OFF_Y=7; //PITCH=0.254; don't really care BOARD_X=66.5; BOARD_Y=36.8; BOARD_PIN_D=1.9; BOARD_PIN_OFF_X=2.5; BOARD_PIN_DIST_X=61; BOARD_PIN_OFF_Y=2.5; BOARD_PIN_DIST_Y=32.5; BOARD_OFF_X=3; BOARD_OFF_Y=3; TOP_LAYER_Z=10; TOTAL_X=100; TOTAL_Y=40; TOTAL_Z=30; module top() { difference() { cube([TOTAL_X, TOTAL_Y, TOP_LAYER_Z]); translate([BOARD_OFF_X, BOARD_OFF_Y, 0]) union() { translate([DISPLAY_OFF_X, DISPLAY_OFF_Y, -1]) cube([DISPLAY_WIN_X, DISPLAY_WIN_Y, TOP_LAYER_Z*2]); // alignment pins translate([BOARD_PIN_OFF_X, BOARD_PIN_OFF_Y, -1]) cylinder(d=BOARD_PIN_D,h=TOP_LAYER_Z/2); translate([BOARD_PIN_OFF_X+BOARD_PIN_DIST_X, BOARD_PIN_OFF_Y, -1]) cylinder(d=BOARD_PIN_D,h=TOP_LAYER_Z/2); translate([BOARD_PIN_OFF_X, BOARD_PIN_OFF_Y+BOARD_PIN_DIST_Y, -1]) cylinder(d=BOARD_PIN_D,h=TOP_LAYER_Z/2); translate([BOARD_PIN_OFF_X+BOARD_PIN_DIST_X, BOARD_PIN_OFF_Y+BOARD_PIN_DIST_Y, -1]) cylinder(d=BOARD_PIN_D,h=TOP_LAYER_Z/2); } } } top();