Function triangulate

Source
pub fn triangulate(solid: &Polyhedron) -> TriMesh
Expand description

Triangulate a polyhedron for measurement and diagnosis.

Vertices are shared through exact-coordinate keying: emitting a fresh vertex per face would leave every edge used once, so an audit would report a cloud of boundary edges for a solid that is in fact closed. Coordinates that meet do so bit-identically, because they come from the same literal or the same split, so exact keying is correct and no welding tolerance is invented.

Fanning assumes convex rings. A non-convex face fans into triangles that leave the footprint, so callers measuring such a solid must supply a closed-form oracle instead.