LatticeFree
Free FreeCAD workbench · implicit modelling

Fill any solid with a minimal surface.

LatticeFree generates Gyroid, Schwarz P, and Diamond lattice infill inside FreeCAD — with shell, density grading, and FEM export. No booleans, no paid add-ons.

Gyroid Schwarz P Diamond
Gyroid slice density 40%
sin·x cos·y + sin·y cos·z + sin·z cos·x = t  ·  walls thicken as density rises
01

What it is

Commercial CAD packages hide TPMS infill behind expensive lattice modules. LatticeFree does it in FreeCAD, for free, with the parameters that actually matter for 3D printing and lightweight structural parts exposed and explained — not buried.

The whole pipeline is implicit: the signed-distance field of your part is combined with the TPMS field, then extracted as one watertight mesh. That stays robust even at low densities, where boolean-based approaches tend to fall apart. The calculation core carries no GUI dependency, so the same math can drive a script or a batch run.

02

Three surfaces

All three are triply-periodic minimal surfaces — smooth, self-supporting, with no flat internal ceilings to bridge. They differ in channel topology and stiffness-to-weight behaviour, and each ships with its own measured density calibration.

Gyroid

The all-rounder. Interconnected channels in every direction, no straight walls — isotropic and forgiving to print. The default choice for most parts.

Schwarz P

Large rounded pores along the axes. Open and permeable — favoured for flow, cooling, and filtration, and stiff along its principal directions.

Diamond

The densest network of the three. Excellent stiffness and energy absorption for its weight, at the cost of finer, more demanding walls.

03

Parameters, explained

Not just what each control does, but why it matters and how it changes the result. The dialog is the same for all three surfaces.

Geometry
Cell size
mm · ≥ 3–4 cells across part
Size of one repeating unit — independent of density. It sets how coarse or fine the pattern is, not how much material there is. Large cells give few big channels; small cells a fine texture with more walls per millimetre.
TPMS type
gyroid | schwarz p | diamond
The surface family the infill is built on. Each carries its own measured density↔isovalue calibration, so a "30%" gyroid and a "30%" Schwarz P really land at the same relative density.
Density
Relative density
10–70 %
The headline structural knob: how much of the volume is wall. It maps to an isovalue through a measured calibration, and the reported physical wall thickness follows. On parts only 1–2 cells thick the realized value can drift a few percent; with ≥ 3–4 cells it converges.
Grading
dense skin → light core
Optional. Wall thickness varies smoothly from a denser skin to a lighter core. The gradient is gradual on purpose: an abrupt stiff-to-soft jump concentrates stress and becomes a crack initiation site.
Nozzle diameter
0.2 mm · default
The printability guard for grading. It sets the minimum printable wall and clamps interior density so nothing asks for walls thinner than the nozzle can lay down — no sub-resolution ghost walls that vanish at slicing.
Finishing
Shell thickness
mm · 0 = exposed
The solid outer skin. 0 leaves the lattice open at the surface (flow, filtration, visible pattern); a non-zero value gives a closed, load-spreading wall that follows holes and cavities.
Fillet radius
mm
Rounds the shell/lattice junction. A sharp junction is a stress raiser; the fillet blends the two so load transfers smoothly. Small values are usually enough.
Compute & analysis
Grid element size
auto = min(cell/15, wall/3)
Sampling resolution of the field. Leave it on auto. Too coarse relative to the thinnest wall and you get hexagonal holes — walls under-sampled by construction, not a design flaw. Cost grows with the cube of resolution.
Output
mesh | solid cad
Mesh is fast and is what you print. Solid CAD converts to a BRep body (slow) — only worth it when a true CAD solid is needed downstream.
FEM mid-surface export
.inp · .msh
Exports the lattice mid-surface for CalculiX/Abaqus or Gmsh. Clean and watertight, but not FEM-grade as-is — remesh in your solver for analysis-quality elements.
04

Requirements & install

What you need

  • FreeCAD 1.0+ — uses its bundled Python, PySide and Mesh/Part modules.
  • numpy — ships with FreeCAD.
  • scipy — optional; enables an exact distance field, with a built-in fallback if absent.
  • Nothing else. FEM writers are internal.

Install

Copy the LatticeFree folder into your FreeCAD Mod directory, then restart FreeCAD.

macOS · ~/Library/Application Support/FreeCAD/v1-1/Mod/ Windows · %APPDATA%\FreeCAD\Mod\ Linux · ~/.local/share/FreeCAD/Mod/