$fn=64; // --- Parameters --- columns = 5; rows = 4; // 5 x 4 = 20 paint tubes hole_diameter = 26; // 26mm fits standard miniature paint bottles and standard acrylic tubes hole_depth = 22; // Depth of the holder wall_thickness = 2; // Thickness of the plastic walls base_thickness = 2; // Thickness of the bottom floor // --- Calculated Variables --- outer_diameter = hole_diameter + (wall_thickness * 2); // Spacing creates a 1.5mm overlap between cylinders to fuse them into a single solid body spacing = outer_diameter - 1.5; // --- Geometry --- difference() { // Main body: A grid of overlapping solid cylinders union() { for (c = [0 : columns - 1]) { for (r = [0 : rows - 1]) { translate([c * spacing, r * spacing, 0]) cylinder(h = hole_depth + base_thickness, d = outer_diameter); } } } // Hollow out the cylinders to create the tube holders for (c = [0 : columns - 1]) { for (r = [0 : rows - 1]) { translate([c * spacing, r * spacing, base_thickness]) // Add 1 to height to ensure a clean manifold cut through the top surface cylinder(h = hole_depth + 1, d = hole_diameter); } } }