$fn=64; // --- Parameters --- hex_width = 60; // Flat-to-flat width of the hexagon tile_height = 5; // Total thickness of the tile chamfer = 1; // Top and bottom edge chamfer // Calculate outer radius (point-to-point) // For a hexagon, flat-to-flat = sqrt(3) * R r_outer = hex_width / sqrt(3); eps = 0.01; // Small overlap to ensure manifold geometry // --- Module --- module hex_base_tile() { union() { // Bottom chamfer (helps prevent elephant foot) cylinder(h=chamfer + eps, r1=r_outer-chamfer, r2=r_outer, $fn=6); // Main solid body translate([0, 0, chamfer]) cylinder(h=tile_height - (2*chamfer) + eps, r=r_outer, $fn=6); // Top chamfer (smooth edges for desk use) translate([0, 0, tile_height - chamfer]) cylinder(h=chamfer, r1=r_outer, r2=r_outer-chamfer, $fn=6); } } // --- Render --- hex_base_tile();