Function project_mesh

Source
pub fn project_mesh<M>(
    mesh: &M,
    plane: PlaneFrame,
    tolerance: Tolerance,
) -> Result<Projection, ProjectionError>
where M: TriangleMeshView + ?Sized,
Expand description

Project a triangle mesh onto plane and union the projected triangles.

The result is a polygon set with holes, not an outline or a hull: a mesh with a through-hole projects to a polygon that still has the hole.

Triangles are unioned pairwise into an accumulator rather than handed to the backend as one soup, because the planar validator rejects self-intersecting input and a raw triangle soup routinely overlaps itself.