$fn = 64; // --- Parameters --- // Total length of this divider piece (mm) length = 200; // Height of the divider (mm) height = 50; // Thickness of the divider material (mm) thickness = 2.0; // Number of interlocking slots (defines compartment count) num_slots = 4; // Tolerance for interlocking fit (mm) - increase if fit is too tight tolerance = 0.4; // --- Module --- module divider_strip(l, h, t, slots, tol) { slot_w = t + tol; spacing = l / (slots + 1); difference() { // Main divider body (laid flat for optimal 3D printing) cube([l, h, t]); if (slots > 0) { for (i = [1 : slots]) { // Interlocking slot cutout (cuts halfway through the height) translate([i * spacing - slot_w/2, h/2, -0.1]) cube([slot_w, h/2 + 0.2, t + 0.2]); // V-shaped chamfer at slot entry for easier assembly translate([i * spacing - slot_w/2, h - 2, -0.1]) linear_extrude(t + 0.2) polygon([ [-2, 2.2], // Top left (wider) [slot_w + 2, 2.2], // Top right (wider) [slot_w, 0], // Bottom right (slot width) [0, 0] // Bottom left (slot width) ]); } } } } // --- Output --- // Generate one divider piece. // Print multiple pieces and flip half of them upside down to create an interlocking grid. divider_strip(length, height, thickness, num_slots, tolerance);