Skip to main content

remove_small_components

Function remove_small_components 

Source
pub fn remove_small_components(
    tx: &mut Transaction<'_>,
    options: &ComponentOptions,
) -> Result<RemoveReport>
Expand description

Removes the connected components (triangles joined through shared edges of any kind) that are below any bound that is set, and the vertices left unused. Triangles with a repeated vertex id belong to no component and stay.

On a mesh with UVs, an edge also joins across a seam (coincident corners, compared exactly), so the UV islands of one surface count as one component.

ยงErrors

OpsError::InvalidInput when no bound is set or min_area is negative, NaN or infinite; OpsError::Store when memory runs out.