Lattices as Python programs
A lattice in OpenVCAD has two parts: a unit cell, which defines what repeats, and a cell map, which defines where and how it repeats. The built-in library covers the common families, and custom cells can be written in Python from vertices and edges, implicit functions, or Voronoi seeds. The result is an ordinary OpenVCAD object, so it can be combined with other geometry, carry material fields, and be compiled for any supported printer.
import pyvcad as pv
import pyvcad_metamaterials as mm
# A 30 mm block of gyroid cells, three on each side
cell_map = mm.rectangular_cell_map(
(pv.Vec3(-15, -15, -15), pv.Vec3(15, 15, 15)),
cells=(3, 3, 3),
)
lattice = mm.gyroid(cell_map, wall_thickness=1.2)
Swapping mm.gyroid for mm.octet or a custom cell, or looping over wall thickness for a parameter study, is a one-line change.
Conformal lattices
Cells do not have to sit on a rectangular grid. A cell map can follow a CAD face, fill the space between two surfaces, or wrap a triangle mesh, so the lattice bends with the part instead of being clipped out of a block. The plate-lattice helmet liners are a real-world example: a lattice that fills the space between the head and the helmet shell.
Custom, stochastic, and mixed cells
Researchers often need cells that no catalogue includes. Graph cells, periodic implicit functions, Voronoi and Delaunay foams, and joins between different cell types are all built from the same few Python interfaces.
Grading geometry and materials
Wall thickness, strut radius, and cell size can vary through a lattice, and so can material properties such as stiffness or color. Each of these is a field that can be defined across the whole lattice, restarted inside every cell, or laid out along each strut or wall. Because the fields belong to the cells, they stay in place when the lattice is mapped onto a curved part.
Model, simulate, print
The same design can be exported for finite element analysis, with meshes refined where the material changes, and compiled for multi-material printing. That makes it practical to study how a lattice’s material layout changes its behavior before printing it.