$fn=64; /* Wall Rail to French Cleat Adapter This model prints flat on its side for maximum strength (layer lines run perpendicular to the load) and requires no supports. Adjust the parameters below to fit your specific wall rail system. */ // --- Adapter Dimensions --- adapter_width = 50; // Width of the adapter (extrusion length) // --- Wall Rail (Hook) Dimensions --- rail_gap_width = 6; // Thickness of the rail lip to hook over rail_lip_height = 15; // Depth of the hook over the rail hook_thickness = 5; // Thickness of the back hook part (fits between rail and wall) hook_chamfer = 2; // Taper at the bottom of the hook for easy insertion // --- Body Dimensions --- body_thickness = 15; // Solid body thickness between rail and cleat body_height = 35; // Height of the main support body lower_support = 20; // How far the body extends down to rest against the track face // --- French Cleat Dimensions --- cleat_size = 19; // Width and height of the 45-degree wedge (~3/4 inch) cleat_blunt = 2; // Flat blunting at the sharp tip of the cleat // --- Calculated Coordinates --- X1 = hook_thickness; X2 = hook_thickness + rail_gap_width; X3 = hook_thickness + rail_gap_width + body_thickness; X4 = X3 + cleat_size; Y0 = -lower_support; Y1 = 0; Y2 = rail_lip_height; Y3 = body_height; Y4 = body_height + cleat_size; // --- Geometry --- linear_extrude(height = adapter_width) { polygon(points = [ [0, hook_chamfer], // 0. Bottom back of hook (chamfered) [X1, Y1], // 1. Bottom inside of hook [X1, Y2], // 2. Top inside of rail slot [X2, Y2], // 3. Top outside of rail slot [X2, Y0], // 4. Bottom back of support body [X4, Y0], // 5. Bottom front of adapter [X4, Y4 - cleat_blunt], // 6. Top front of cleat [X4 - cleat_blunt, Y4 - cleat_blunt], // 7. Flat top of cleat [X3, Y3], // 8. Inner corner of cleat [0, Y3] // 9. Top back of adapter ]); }