// Bee Hotel - a hexagonal nesting block for solitary bees (mason and leafcutter bees): a honeycomb of blind 8 mm // tubes with a closed back, a roof that sticks out over the top, and a hanging tab. // Prints lying on its back with no supports: the tubes are straight up and the roof is just taller walls. // Designed with AI assistance. License: CC BY-NC-SA 4.0 /* [Hotel] */ // Size across the corners, in mm size = 100; // [80:5:180] // Tube depth, in mm (mason bees like 100 mm or more) depth = 80; // [50:5:150] // Tube size across the flats, in mm (7-8 for mason bees, 6 for smaller bees) cell = 8; // [5:0.5:10] // Wall between tubes, in mm cell_wall = 1; // [0.8:0.1:2] // How far the roof sticks out, in mm roof = 12; // [0:1:30] /* [Hidden] */ R = size / 2; fw = 4; back = 3; module hex(r) rotate(90) circle(r = r, $fn = 6); // a corner at the top (the roof ridge) module cells2d() { p = cell + cell_wall; dy = p * sqrt(3) / 2; rc = cell / sqrt(3); intersection() { hex(R - fw - 0.01); difference() { hex(R - fw); for (j = [-ceil(R / dy) : ceil(R / dy)], i = [-ceil(R / p) - 1 : ceil(R / p) + 1]) translate([i * p + (abs(j) % 2) * p / 2, j * dy]) circle(r = rc, $fn = 6); } } } union() { linear_extrude(depth + back) difference() { hex(R); hex(R - fw); } linear_extrude(back) hex(R - fw + 0.01); translate([0, 0, back - 0.01]) linear_extrude(depth + 0.01) cells2d(); // the roof: the two top walls run on past the front linear_extrude(depth + back + roof) intersection() { difference() { hex(R); hex(R - fw); } translate([-R, R / 2 - 0.01]) square([2 * R, R]); } // hanging tab above the top corner, flat on the bed difference() { hull() { translate([0, R - 6]) cylinder(r = 10, h = 4, $fn = 48); translate([0, R + 6]) cylinder(r = 10, h = 4, $fn = 48); } translate([0, R + 7, -1]) cylinder(d = 7, h = 10, $fn = 32); } }