Skip to main content

thin_sheet

Function thin_sheet 

Source
pub fn thin_sheet(mesh: &TriMesh, linear: f64) -> Option<ThinSheet>
Expand description

The first pair of triangles of mesh that form a sheet thinner than linear, in ascending (first, second) order with first < second.

A pair qualifies when both triangles are non-degenerate, their unit normals point opposite ways, the distance between them is at most linear, every corner of each lies within linear of the other’s plane, and, projected onto the first’s plane, they overlap in a polygon whose doubled area exceeds linear times its perimeter: contact along a single edge is not a sheet. Exactly coplanar pairs count. None when no pair qualifies, and when linear is negative or not finite.

§Panics

Never. A malformed index buffer yields None rather than a panic.