mesh.insetFaces
The mesh with chosen faces shrunk so each edge moves a set distance inward, framed by rings of new quads.
Usage
mesh.insetFaces(faces: ElementSet, amount: number): Result<Mesh>Parameters
facesElementSetA prim set of this mesh.
amountnumberHow far each edge moves in from where it was, measured in the face’s plane. Required. In model.
Returns
Ok with the inset mesh: each inset face gains one quad per edge.
Errors
Guarantees
- volume() is unchanged (the shape is not moved, only re-faced)
- insetting one quad of a box gives 10 faces
- The same result on every machine.
Example
const r = Mesh.box().value.insetFaces(ElementSet.prims([1]), 0.25) // → 10 faces once loadGeometryKernel() has run