$fn=64; // --- Parameters --- hex_radius = 20; // Outer radius of a single hexagon (center to point) thickness = 3; // Thickness of the baseplate overlap = 0.05; // Small overlap to ensure a manifold (watertight) mesh // --- Calculated Values --- // Distance between centers of adjacent hexagons center_dist = hex_radius * sqrt(3) - overlap; // Centroid offset to center the entire configuration at the origin cx = center_dist * 0.5; cy = center_dist * sqrt(3) / 6; // --- Modules --- module single_hex() { // Rotate 30 degrees so the flat sides face the adjacent hexagons rotate([0, 0, 30]) cylinder(h=thickness, r=hex_radius, $fn=6); } // --- Main Geometry --- translate([-cx, -cy, 0]) { union() { // Bottom-left hex single_hex(); // Bottom-right hex translate([center_dist, 0, 0]) single_hex(); // Top hex translate([center_dist * 0.5, center_dist * sqrt(3) / 2, 0]) single_hex(); } }