$fn = 64; // --- Parameters --- length = 200; // Total length of the cleat strip height = 35; // Total height of the cleat thickness = 15; // Total thickness (depth from wall) top_flat = 5; // Thickness of the flat top edge (prevents sharp fragile tip) bevel_height = 10; // Height of the 45-degree interlocking bevel num_holes = 4; // Number of mounting holes hole_margin = 25; // Distance from the ends to the first/last hole hole_dia = 4.5; // Diameter of the screw shaft (e.g., #8 wood screw) head_dia = 9.0; // Diameter of the screw head head_depth = 3.0; // Depth of the countersink cone // --- Calculated Values --- front_straight = height - bevel_height; // --- Main Assembly --- difference() { // Base cleat profile // Rotated so the back (wall side) lies flat on the Z=0 build plate for easy printing rotate([90, 0, 90]) linear_extrude(height = length) polygon([ [0, 0], [height, 0], [height, top_flat], [front_straight, thickness], [0, thickness] ]); // Subtract mounting holes for (i = [0 : num_holes - 1]) { x_pos = hole_margin + i * ((length - 2 * hole_margin) / (num_holes - 1)); translate([x_pos, front_straight / 2, 0]) screw_hole(); } } // --- Modules --- module screw_hole() { // Screw shaft (extended slightly below 0 for a clean manifold cut) translate([0, 0, -1]) cylinder(h = thickness + 2, d = hole_dia); // Countersink cone translate([0, 0, thickness - head_depth]) cylinder(h = head_depth + 0.01, d1 = hole_dia, d2 = head_dia); // Extra clearance above the countersink to ensure a clean subtraction at the surface translate([0, 0, thickness]) cylinder(h = 2, d = head_dia); }