Geometric · Test cube 8
Honeycomb
Raised hexagon walls round shallow cells.
Patterns hold things together. Trust me, I am infill.
- Prints well with a 0.4 mm nozzle.
25 mm, with your size and depth. Prints upright, no supports. About 4 MB.
- Depth as written1.2 mm
- Narrowest partabout 1.8 mm
- Smallest size, 0.4 mm nozzle× 0.70
Good for
Anything techy or bee-themed; reads clearly from far away.
Print notes
- Depth 0.4 to 1.5 mm for a 0.4 mm nozzle (as written: 1.2 mm).
- Best on walls, printed upright. On a flat top, use thin layers (0.12 mm or less).
- Fade it out over the bottom 3 mm so the first layers are flat and stick to the plate.
- Not printed yet: these notes come from the geometry. The test cube will tell us more.
The formula
The real code this page runs: give it a point (U mm across, V mm up) and it returns the height there, in mm. Push the surface out by that much and the texture is real geometry.
function honeycomb(U: number, V: number, p = 9.0, amp = 1.2, wall = 0.1) {
const q = U / p;
const r = V / (p * 0.866);
const rr = Math.floor(r);
const off = mod(rr, 2) * 0.5;
const cc = Math.floor(q - off);
let best = 9.0;
for (const dr of [-1, 0, 1])
for (const dc of [-1, 0, 1]) {
const R = rr + dr;
const C = cc + dc + mod(R, 2) * 0.5;
best = Math.min(best, Math.hypot(q - (C + 0.5), (r - (R + 0.5)) * 0.866));
}
const edge = clamp((best - (0.5 - wall)) / wall, 0, 1);
return amp * (0.35 + 0.65 * edge);
}The helpers it uses (mod, clamp)
/** Python's floor modulo: the result has the sign of b (`-1 % 2` is 1, as in numpy). */
function mod(a: number, b: number) {
return a - b * Math.floor(a / b);
}function clamp(x: number, lo: number, hi: number) {
return Math.min(Math.max(x, lo), hi);
}Printed
Test cube 8 is waiting for the printer. Its photo goes here.