Skip to main content

Module mesh_processing

Module mesh_processing 

Source
Expand description

Triangle mesh smoothing and decimation, on indexed meshes (vertices, triangles).

See the book entry Triangle meshes: smoothing, decimation and slicing.

Functions§

boundary_vertices
Whether each vertex lies on the boundary (on an edge used by only one triangle).
decimate
Simplifies a triangle mesh to about target_triangles triangles by quadric error metric edge collapse (Garland and Heckbert): each vertex accumulates the area-weighted squared distances to the planes of its original triangles, and the edge whose collapse to the quadric-optimal point adds the least error is collapsed first. Collapses that would flip a triangle, break the manifold link condition are skipped; boundary vertices never move (interior vertices may collapse onto them, but boundary edges are never collapsed), so open boundaries are preserved exactly. Returns the compacted vertices and triangles.
laplacian_smoothing
Laplacian (umbrella) smoothing: each vertex moves a fraction lambda towards the mean of its neighbours, iterations times. Boundary vertices stay put with keep_boundary. Simple but it shrinks closed surfaces; see taubin_smoothing.
taubin_smoothing
Taubin’s λ|μ smoothing: alternating shrinking (λ > 0) and inflating (μ < −λ) Laplacian steps form a low-pass filter that removes noise without the shrinkage of plain Laplacian smoothing (typical values λ = 0.5, μ = −0.53).
vertex_neighbours
The neighbouring vertices of every vertex.