$fn=64; // --- PARAMETERS --- // Hex key sizes (metric) hex_sizes = [1.5, 2.0, 2.5, 3.0, 4.0, 5.0, 6.0, 8.0, 10.0]; clearance = 0.8; hole_spacing = 13.0; // Main body dimensions body_width = 130.0; body_height = 20.0; body_depth = 25.0; // Multiboard peg dimensions peg_diameter = 7.8; // Snug push-fit for standard 8mm multiboard holes peg_length = 6.0; peg_positions = [-50, 0, 50]; // 25mm grid compatible spacing // --- MODULES --- module hex_allen_key_holder() { union() { difference() { // Main Body Block translate([0, 0, body_depth / 2]) cube([body_width, body_height, body_depth], center=true); // Hex Key Holes for (i = [0 : 8]) { x_pos = -52 + (i * hole_spacing); hole_dia = hex_sizes[i] + clearance; // Holes are offset away from the wall to clear the pegboard translate([x_pos, 0, 14.5]) rotate([90, 0, 0]) cylinder(h=body_height + 2, d=hole_dia, center=true); } } // Multiboard Push-Fit Pegs for (x = peg_positions) { // 0.1mm Z-translation ensures manifold overlap with the main body translate([x, 0, 0.1]) { rotate([180, 0, 0]) { // Main peg shaft cylinder(h=peg_length - 1.5 + 0.1, d=peg_diameter); // Chamfered tip for easy insertion translate([0, 0, peg_length - 1.5 + 0.1]) cylinder(h=1.5, d1=peg_diameter, d2=peg_diameter - 1.5); } } } } } // --- RENDER --- hex_allen_key_holder();