65 lines
1.5 KiB
OpenSCAD
65 lines
1.5 KiB
OpenSCAD
$fn = 32;
|
|
|
|
$space = 3.3;
|
|
$width = 15.2;
|
|
$length = $width;
|
|
$height = 1;
|
|
$holes = $height*4;
|
|
$cut = $holes/2*-1;
|
|
$switchDistance = $width+ $space;
|
|
|
|
$columns = 6;
|
|
$rows = 5;
|
|
|
|
$xBase = (($width + $space) * $columns) + $space;
|
|
$yBase = (($length + $space) * $rows) + $space;
|
|
|
|
|
|
module pin(){
|
|
cylinder(h=$holes, r=1, center=false);
|
|
}
|
|
|
|
module switch(){
|
|
$xCenter = $width/2;
|
|
$yCenter = $length/2;
|
|
translate([$xCenter, $yCenter, 0])
|
|
cylinder(h=$holes, r=2.522, center=false);
|
|
translate([$xCenter + 0, $yCenter + 5.9,0])
|
|
pin();
|
|
translate([$xCenter + 5, $yCenter + 3.8,0])
|
|
pin();
|
|
translate([$xCenter + -5, $yCenter + 3.8,0])
|
|
pin();
|
|
translate([$xCenter + -5, $yCenter + -5.15,0])
|
|
pin();
|
|
translate([$xCenter + 5, $yCenter+-5.15,0])
|
|
pin();
|
|
translate([0, $length + 1.4, 0]);
|
|
}
|
|
|
|
|
|
module switchColumn(){
|
|
difference() {
|
|
translate([-($space/2), -($space/2)])
|
|
cube([$switchDistance, $switchDistance * $rows, $height]);
|
|
for (y=[0:$rows-1])
|
|
translate([0 * ($width + $space) ,y * ($length+$space) ,0])
|
|
switch();
|
|
}
|
|
}
|
|
|
|
module topDampener(){
|
|
switchColumn();
|
|
translate([$switchDistance,0,0])
|
|
switchColumn();
|
|
translate([$switchDistance * 2,5,0])
|
|
switchColumn();
|
|
translate([$switchDistance * 3,0,0])
|
|
switchColumn();
|
|
translate([$switchDistance * 4,-5,0])
|
|
switchColumn();
|
|
translate([$switchDistance * 5,-5,0])
|
|
switchColumn();
|
|
}
|
|
|
|
topDampener(); |