$fn=64; // --- Parametric Variables --- tolerance = 0.8; // Extra diameter for easy insertion/removal pitch = 14; // Distance between hole centers sizes = [1.5, 2.0, 2.5, 3.0, 4.0, 5.0, 6.0, 8.0, 10.0]; num_keys = 9; W = 24; // Width (depth) of the block H1 = 12; // Height at the small end H2 = 45; // Height at the large end bottom_thickness = 3; // Minimum solid thickness below the holes text_size = 5; // Size of the embossed labels // Calculate total length based on number of keys and pitch L = pitch * (num_keys - 1) + 20; difference() { // Main sloped block translate([0, W/2, 0]) rotate([90, 0, 0]) linear_extrude(W) polygon([ [0, 0], [L, 0], [L, H2], [0, H1] ]); // Hex key holes for (i = [0 : num_keys - 1]) { translate([10 + i * pitch, 0, bottom_thickness]) cylinder(h = H2 + 10, d = sizes[i] + tolerance); } // Size labels (engraved 1mm deep on the front face) for (i = [0 : num_keys - 1]) { translate([10 + i * pitch, -W/2 + 1, H1/2]) rotate([90, 0, 0]) linear_extrude(2) text( str(sizes[i]), size = text_size, halign = "center", valign = "center", font = "Arial:style=Bold" ); } }