// FIRST LAYER / a parametric desk tray // Units: millimeters. Render (F6), then export STL. // Inspect in your slicer. No physical print test is claimed. width = 120; depth = 80; height = 24; wall = 2; compartments = 3; base = wall; clear_width = (width - (compartments + 1) * wall) / compartments; assert(clear_width > 0 && depth > 2*wall && height > base); difference() { cube([width, depth, height]); for (i = [0:compartments-1]) translate([wall + i*(clear_width + wall), wall, base]) cube([clear_width, depth - 2*wall, height - base + 0.1]); }