// Parametric L-Bracket based on engineering drawing // All dimensions in millimeters (mm) /* [Key Parameters] */ // Plate thickness for both legs plate_thickness = 4.0; // [1.0:0.5:12.0] // Diameter of the 4 through-holes hole_diameter = 6.0; // [2.0:0.5:12.0] /* [Bracket Dimensions] */ // Total horizontal length (outer face to edge) bracket_length = 60.0; // [30:1:120] // Total vertical height (outer face to edge) bracket_height = 40.0; // [20:1:100] // Total bracket width (depth) bracket_width = 40.0; // [20:1:100] /* [Hole Positions] */ // Centerline of horizontal leg holes from outer vertical face hole_offset_x = 40.0; // [10:1:80] // Centerline of vertical leg holes from outer bottom face hole_offset_z = 25.0; // [10:1:60] // First hole center along width hole_offset_y1 = 10.0; // [4:1:30] // Second hole center along width hole_offset_y2 = 30.0; // [10:1:60] /* [Appearance] */ bracket_color = "LightSlateGray"; // Smoothness of circular cuts $fn = 64; module l_bracket() { eps = 0.05; difference() { // Main L-bracket solid body union() { // Horizontal base leg cube([bracket_length, bracket_width, plate_thickness]); // Vertical upright leg cube([plate_thickness, bracket_width, bracket_height]); } // Holes in horizontal leg (drilled through Z) translate([hole_offset_x, hole_offset_y1, -eps]) cylinder(d = hole_diameter, h = plate_thickness + 2 * eps); translate([hole_offset_x, hole_offset_y2, -eps]) cylinder(d = hole_diameter, h = plate_thickness + 2 * eps); // Holes in vertical leg (drilled through X) translate([-eps, hole_offset_y1, hole_offset_z]) rotate([0, 90, 0]) cylinder(d = hole_diameter, h = plate_thickness + 2 * eps); translate([-eps, hole_offset_y2, hole_offset_z]) rotate([0, 90, 0]) cylinder(d = hole_diameter, h = plate_thickness + 2 * eps); } } color(bracket_color) l_bracket();