vcgClean: Clean triangular surface meshes

Description Usage Arguments Details Value Examples

View source: R/vcgClean.r

Description

Apply several cleaning algorithms to surface meshes

Usage

1
vcgClean(mesh, sel = 0, tol = 0, silent = FALSE, iterate = FALSE)

Arguments

mesh

triangular mesh of class 'mesh3d'

sel

integer vector selecting cleaning type (see "details"),

tol

numeric value determining Vertex Displacement Ratio used for splitting non-manifold vertices.

silent

logical, if TRUE no console output is issued.

iterate

logical: if TRUE, vcgClean is repeatedly run until nothing more is to be cleaned (see details).

Details

the vector sel determines which operations are performed in which order. E.g. removing degenerate faces may generate unreferenced vertices, thus the ordering of cleaning operations is important, multiple calls are possible (sel=c(1,3,1) will remove unreferenced vertices twice). available options are:

Value

cleaned mesh with an additional entry

remvert

vector of length = number of vertices before cleaning. Entries = 1 indicate that this vertex was removed; 0 otherwise.

Examples

1
2
3
4
5
6
7
8
9
data(humface)
cleanface <- humface
##add duplicated faces
cleanface$it <- cbind(cleanface$it, cleanface$it[,1:100])
## add duplicated vertices
cleanface$vb <- cbind(cleanface$vb,cleanface$vb[,1:100])
## ad unreferenced vertices
cleanface$vb <- cbind(cleanface$vb,rbind(matrix(rnorm(18),3,6),1))
cleanface <- vcgClean(cleanface, sel=1)

zarquon42b/Rvcg documentation built on Jan. 17, 2019, 9:10 a.m.