$fn=64; // --- Parameters --- num_hexagons = 6; // Number of hexagons in the strip hex_outer_radius = 16; // Outer radius (center to point) in mm strip_height = 12; // Total height of the strip in mm wall_thickness = 2; // Uniform wall thickness in mm base_thickness = 1.5; // Solid base thickness in mm (set to 0 for open bottom) // --- Calculated Variables --- cos30 = sqrt(3) / 2; // Calculate inner radius to maintain the exact wall thickness inner_radius = hex_outer_radius - (wall_thickness / cos30); // Calculate center-to-center offset to ensure shared walls equal wall_thickness x_offset = 2 * hex_outer_radius * cos30 - wall_thickness; // --- Geometry --- module hex_strip() { difference() { // Main solid body union() { for(i = [0 : num_hexagons - 1]) { translate([i * x_offset, 0, 0]) rotate([0, 0, 30]) cylinder(h=strip_height, r=hex_outer_radius, $fn=6); } } // Hollow inner cutouts union() { for(i = [0 : num_hexagons - 1]) { // Position cutout above the base, extending past the top for a clean cut translate([i * x_offset, 0, base_thickness > 0 ? base_thickness : -1]) rotate([0, 0, 30]) cylinder(h=strip_height + 2, r=inner_radius, $fn=6); } } } } // Render the object hex_strip();