$fn = 32; $space = 5.3; $width = 15.2; $length = $width; $height = 1; $holes = $height*4; $cut = $holes/2*-1; $columns = 6; $rows = 5; $xBase = (($width + $space) * $columns) + $space; $yBase = (($length + $space) * $rows) + $space; $yTop = 30.750; $xTop = 101.348; $xPico = 52.53; $yPico = 25; $xAux = 10; $yAux = 14.5; 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]) cube([$width, 3, $holes]); } module switches(){ for (x=[0:$columns -1]) for (y=[0:$rows-1]) translate([x * ($width + $space) ,y * ($length+$space) ,0]) switch(); } module body(){ difference(){ cube([$xBase, $yBase + $yTop, $height]); translate([$xTop,$yBase + $yTop,$holes/2*-1]){ rotate([0,0,-45]){ cube([1000, 1000, $holes]); } } } } module pico(){ translate([0,$yTop + $yBase - $yPico,$cut]){ cube([$xPico, $yPico, $holes]); } translate([$xPico, $yBase + $yTop - $yAux, $cut]){ cube([$xAux, $yAux, $holes]); } } difference(){ body(); pico(); translate([$space,$space,$holes/2*-1]) switches(); }