Skip to main content

Module simplify

Module simplify 

Source
Expand description

Decimating a triangulation.

A mesh fine enough for a mass property is far finer than one needed to draw, and a mesh fine enough to draw a whole assembly is far finer than one needed for the bolt in the corner of it. Decimation is how one tessellation serves both without being computed twice.

§The error is measured, not hoped for

Collapsing an edge moves the surface. How far it moves is what decides whether the collapse is worth making, so every candidate carries the squared distance from the merged vertex to the planes of every face that met there: the quadric error metric of Garland and Heckbert. Summing plane distances this way costs one small symmetric matrix per vertex and makes the choice a comparison rather than a guess.

The result reports the worst error it accepted. A decimation that returned only a smaller mesh would be one nothing downstream could decide to trust.

§What it will not touch

A vertex on a boundary stays. The alternative is a constraint plane that makes boundary collapses expensive but possible, and “expensive but possible” means the outline of a sheet body creeps inward as the mesh coarsens, which is exactly the thing a caller would not think to check. Holding the boundary exactly is a stronger promise and a simpler one.

A collapse that would turn a triangle inside out is refused for the same reason: a fold is not a small error, it is a mesh that no longer bounds what it did.

Structs§

Simplified
What decimation produced.

Enums§

Target
How far to decimate.

Functions§

simplify
Decimate a mesh.