// Original CooperLux demonstration. Millimetres. Not yet physically printed. // OpenSCAD 2021.01; export with: openscad -o bench-tray.stl bench-tray.scad length = 120; width = 80; height = 24; wall = 2.4; floor_thickness = 2; compartments = 3; assert(length <= 200 && width <= 200 && height <= 100, "This service sample uses a conservative 200 x 200 x 100 mm envelope."); assert(wall >= 1.6 && floor_thickness >= 1.2 && height > floor_thickness); assert(compartments >= 1 && compartments == floor(compartments)); clear_width = (length - 2 * wall - (compartments - 1) * wall) / compartments; assert(clear_width >= 10 && width > 2 * wall + 10, "Each compartment needs at least 10 mm clear width."); union() { difference() { cube([length, width, height]); translate([wall, wall, floor_thickness]) cube([length - 2 * wall, width - 2 * wall, height]); } if (compartments > 1) for (i = [1 : compartments - 1]) translate([wall + i * clear_width + (i - 1) * wall, 0, 0]) cube([wall, width, height]); }