neotrellis-grid/plate.scad

34 lines
1.1 KiB
OpenSCAD
Raw Normal View History

2021-07-20 11:52:35 +00:00
// this SCAD file defines the top plate for the case of a neotrellis monome-compatible grid controller.
// the file is designed to be parametric, for easier testing.
// TODO tolerances
// first, we declare some parameters, that will be useful to tweak while testing the model:
// Button size (in mm)
button_size = 10;
// Spacing between buttons (in mm)
spacing = 5;
// Tolerance for button holes (how much larger they are than a button)
tolerance = 0.4;
// outer spacing - spacing between the edge of the silicon part and the buttons
outer_spacing = 2.5;
// module for a 4x4 unit of the top plate.
module plate4x4(thickness) {
difference() {
cube(
[outer_spacing*2+button_size*4+spacing*3,
outer_spacing*2+button_size*4+spacing*3,
thickness]);
for(x=[0:3]) {
for(y=[0:3]) {
translate(
[outer_spacing-(tolerance/2)+((button_size+spacing)*x),
outer_spacing-(tolerance/2)+((button_size+spacing)*y),
-0.5])
cube([button_size+tolerance,button_size+tolerance,thickness+1]);
}
}
}
}
plate4x4(1);