Module exact

Source
Expand description

Mass properties of an exact B-rep, without tessellating it.

§Why this exists separately

crate::mesh_measure::MeshMeasure measures a TriMesh. An exact B-rep has no triangles, so measuring one previously meant tessellating first – which converts an exact solid into an approximation before measuring it, and then reports the approximation’s volume as though it were the solid’s.

This path measures the exact representation directly. For a planar face bounded by straight edges the divergence theorem is exact over the polygonal boundary, so a prism’s volume comes back at machine precision rather than at tessellation fidelity.

A curved face, or a planar face with a curved edge, is integrated over its own parameter domain by Green’s theorem round the face’s pcurves (module exact_face): the exact surface and the exact trimming curves, with adaptive Gauss-Kronrod quadrature held to a relative error near machine precision. Nothing is faceted.

§Deliberate refusal

An unknown surface family, a face whose boundary does not enclose a domain in its parameters, and an integral that does not converge are refused by name. Approximating any of them would silently reintroduce exactly the tessellation error this path exists to avoid.

Enums§

ExactMeasureError
Why an exact B-rep could not be measured.

Functions§

exact_properties
Mass properties of an exact B-rep.