$fn = 64; // --- Parameters --- hex_radius = 25; // Radius of a single hexagon (center to vertex) base_thickness = 3; // Thickness of the baseplate overlap = 0.05; // Small overlap to ensure watertight union // --- Main Rendering --- hex_cluster_7(); // --- Modules --- module single_hex() { // $fn=6 creates the hexagon shape, overriding the global 64 cylinder(h=base_thickness, r=hex_radius + overlap, $fn=6); } module hex_cluster_7() { // Distance between centers of adjacent hexagons sharing a flat edge center_dist = hex_radius * sqrt(3); union() { // Central hexagon single_hex(); // 6 surrounding hexagons for (i = [0:5]) { // In OpenSCAD, cylinder($fn=6) places vertices at 0, 60, 120... // Flat edges are perpendicular to 30, 90, 150... degrees angle = i * 60 + 30; translate([ center_dist * cos(angle), center_dist * sin(angle), 0 ]) single_hex(); } } }