Learn R Programming

Rvcg (version 0.7.1)

vcgIsolated: Remove isolated pieces from a surface mesh.

Description

Remove isolated pieces from a surface mesh, selected by a minimum amount of faces or of a diameter below a given threshold. Also the option only to keep the largest piece can be selected

Usage

vcgIsolated(mesh, facenum = NULL, diameter = NULL)

Arguments

mesh
triangular mesh of class "mesh3d".
facenum
integer: all connected pieces with less components are removed. If not specified or 0 and diameter is NULL, then only the component with the most faces is kept.
diameter
numeric: all connected pieces smaller diameter are removed removed. diameter = 0 removes all component but the largest ones. This option overrides the option facenum.

Value

  • returns the reduced mesh.

See Also

vcgPlyRead

Examples

Run this code
require(rgl)
data(humface)
cleanface <- vcgIsolated(humface)

Run the code above in your browser using DataLab