$fn=64; // --- Parameters --- // Total width of the organizer (ALEX drawer internal width is ~292mm, 145mm fits 2 side-by-side) total_width = 145; // Total depth of the organizer (ALEX drawer internal depth is ~522mm, 130mm fits 4 front-to-back) total_depth = 130; // Height of the organizer (ALEX shallow drawer max clearance is ~70mm) height = 50; // Number of compartments in the X direction cols = 2; // Number of compartments in the Y direction rows = 1; // Wall and base thickness wall_thickness = 1.6; base_thickness = 1.6; // Outer corner radius corner_radius = 4; // --- Calculated Variables --- comp_w = (total_width - (cols + 1) * wall_thickness) / cols; comp_d = (total_depth - (rows + 1) * wall_thickness) / rows; inner_r = max(0.5, corner_radius - wall_thickness); // --- Modules --- module rounded_box(w, d, h, r) { hull() { translate([r, r, 0]) cylinder(h=h, r=r); translate([w-r, r, 0]) cylinder(h=h, r=r); translate([r, d-r, 0]) cylinder(h=h, r=r); translate([w-r, d-r, 0]) cylinder(h=h, r=r); } } // --- Main Geometry --- difference() { // Outer shell rounded_box(total_width, total_depth, height, corner_radius); // Inner compartments for (c = [0 : cols - 1]) { for (r_idx = [0 : rows - 1]) { x_pos = wall_thickness + c * (comp_w + wall_thickness); y_pos = wall_thickness + r_idx * (comp_d + wall_thickness); // Subtracted void for each compartment translate([x_pos, y_pos, base_thickness]) rounded_box(comp_w, comp_d, height + 1, inner_r); } } }