mesh.extrudeFaces
The mesh with chosen faces pushed along their normals and joined to the rest by new side walls.
Usage
mesh.extrudeFaces(faces: ElementSet, distance: number): Result<Mesh>Parameters
facesElementSetA prim set of this mesh: the faces to push.
distancenumberHow far to push; negative pushes inwards. Required. In model.
Returns
Ok with the extruded mesh.
Errors
Guarantees
- extruding the top of a unit box by d changes volume() by d
- a closed input gives a closed result
- The same result on every machine.
Example
const r = Mesh.box().value.extrudeFaces(ElementSet.prims([1]), 0.5) // → volume 1.5 once loadGeometryKernel() has run