$fn=64; // Parametric variables panel_length = 100; // Length of each leg of the L-shape panel_height = 110; // Total height of the corner panel panel_thickness = 5; // Thickness of the main walls rail_protrusion = 5; // How far the rails stick out from the inner wall rail_thickness = 3; // Vertical thickness of each rail rail_slot_gap = 5; // Gap between the two rails in a single pair num_pairs = 3; // Number of rail pairs per leg pair_spacing = 30; // Vertical distance between the start of each pair first_pair_z = 15; // Z offset for the lowest rail pair union() { // Main L-shaped panel base // X-axis leg cube([panel_length, panel_thickness, panel_height]); // Y-axis leg cube([panel_thickness, panel_length, panel_height]); // 3+3 Rail Pairs for (i = [0 : num_pairs - 1]) { z_base = first_pair_z + i * pair_spacing; z_top_rail = z_base + rail_thickness + rail_slot_gap; // --- X-axis leg rails --- // Bottom rail of the pair translate([panel_thickness, panel_thickness, z_base]) cube([panel_length - panel_thickness, rail_protrusion, rail_thickness]); // Top rail of the pair translate([panel_thickness, panel_thickness, z_top_rail]) cube([panel_length - panel_thickness, rail_protrusion, rail_thickness]); // --- Y-axis leg rails --- // Bottom rail of the pair translate([panel_thickness, panel_thickness, z_base]) cube([rail_protrusion, panel_length - panel_thickness, rail_thickness]); // Top rail of the pair translate([panel_thickness, panel_thickness, z_top_rail]) cube([rail_protrusion, panel_length - panel_thickness, rail_thickness]); } }