The first version of what became LatticeFree was almost embarrassingly simple: a macro that took the gyroid's implicit equation, thickened it into a wall by clamping |f| ≤ thickness, ran marching cubes over it, and boolean-intersected the result with whatever solid you'd selected in FreeCAD. It worked. It also asked you for the wrong number.
Wall thickness tells you how thick a wall is. It doesn't tell you what fraction of the part's volume actually becomes material — and that fraction, the relative density, is the number that actually drives weight and stiffness. Two gyroids with the same nominal thickness can end up meaningfully different in density once the cell size changes, because the surface folds through space differently. If you're designing a part to hit a weight target, thickness is the wrong dial to be turning.
Turning the dial around
So the control got inverted: instead of asking for a thickness, LatticeFree asks for a target relative density (guided between 10–70%, the range where a gyroid infill actually makes structural sense), and works out the isovalue needed to hit it. That mapping isn't guessed — it comes from a calibration table, built by measuring the periodic average of the implicit field at different isovalues and recording what density each one actually produces. Ask for 30% and the tool reports both the isovalue it used and the resulting physical wall thickness, so nothing is hidden.
There's a real limit worth being honest about: on parts only 1–2 cells thick, the realized density can drift a few percent from the target, because cells get clipped at the boundary and the averaging statistics get noisy. With 3–4 cells or more across the part, it converges to within about 1% of what was asked for.
Where the constant came from
The relationship between density and wall thickness isn't something LatticeFree invented from scratch — it's grounded in the density-thickness method from my own master's thesis on 3D-printed lattice structures, re-derived and recalibrated for this specific implementation. That thesis work involved something very physical: printing gyroid specimens and crushing them under compression until they failed, comparing what actually broke against what the finite-element model had predicted. That's not just a nice origin story — it's exactly the mindset that shaped how density is validated here: not "the geometry looks about right," but numbers checked against something that was actually built and tested.
The natural next step
Once density was a real, calibrated control, grading followed almost immediately: instead of one uniform density everywhere, the wall thickness can now vary smoothly from a denser skin to a lighter core, driven by distance from the surface. The transition is a smoothstep, not a hard switch — an abrupt jump between stiff and soft concentrates stress right at the boundary, which is the last thing you want. And because grading can in principle ask for arbitrarily thin walls near the core, it's clamped against the nozzle diameter, so it never requests a wall the printer can't actually lay down.
Next up: how the workbench stopped being a single-surface tool.