Usage
mesh.validate(): Result<MeshValidityReport>
Returns
Ok with the validity report when the mesh is closed, edge-manifold, consistently oriented, finite and free of zero-area faces.
Errors
-
Returned when boundary edges exist.
The mesh has boundary edges (used by one face), so it is not closed. Close the boundary; volume is not reported for an open mesh.
-
Returned when an edge has more than two faces.
An edge is used by more than two faces. Separate or remove the extra faces on the listed edges.
-
Returned when neighbouring faces disagree on which way is out.
Two faces sharing an edge traverse it in the same direction. Flip the faces on one side of the listed edges.
-
Returned when a face has exactly zero area.
A face has zero area: all its corners are collinear (decided exactly). Remove the listed faces or move their points apart.
-
Returned when a coordinate is not finite.
Some points have a NaN or infinite coordinate. Check the parameters feeding the listed points; faces touching them are not measured.
-
Returned when the mesh has no faces.
The geometry has no faces. Check the display node and its parameters.
Guarantees
- succeeds for every output of the exact booleans
- kernel:check reports the same codes for the same geometry
- The same result on every machine.
Example
Mesh.box().value.validate().ok
See also