$fn = 64; // --- PARAMETERS --- // Radius of a single hexagon cell (center to vertex) hex_radius = 25; // Thickness of the divider walls (1.2mm is 3 perimeters on a 0.4mm nozzle) wall_thickness = 1.2; // Height of the divider height = 40; // Clearance gap between divider and bin walls for an easy drop-in fit clearance = 0.4; // --- MODULE --- module hex_divider() { // Adjust thickness for the hexagon so the flat sides equal wall_thickness t_hex = wall_thickness / cos(30); linear_extrude(height) { intersection() { // 1. Bounding Profile: The internal shape of the 7-hex bin // We use offset to merge exact shared edges and apply clearance offset(delta = -clearance - 0.01) offset(delta = 0.01) { union() { // Central hex circle(r = hex_radius, $fn = 6); // 6 surrounding hexes for(i = [0 : 5]) { rotate(i * 60 + 30) translate([hex_radius * sqrt(3), 0]) circle(r = hex_radius, $fn = 6); } } } // 2. Divider Walls: Central hex ring + 6 radiating spokes union() { // Central hex ring difference() { circle(r = hex_radius + t_hex/2, $fn = 6); circle(r = hex_radius - t_hex/2, $fn = 6); } // 6 radiating spokes separating the outer cells for(i = [0 : 5]) { rotate(i * 60) // Overlap by 0.1mm inward to ensure a manifold union translate([hex_radius - t_hex/2 - 0.1, -wall_thickness/2]) // Extend outwards well past the boundary; intersection trims it square([hex_radius * 2, wall_thickness]); } } } } } // --- RENDER --- hex_divider();