require(rgl)
data(nose)
testmesh <- rmVertex(shortnose.mesh,1:50) ## remove first 50 vertices
shade3d(testmesh,col=3)### view result
testmesh$vb <- cbind(testmesh$vb,shortnose.mesh$vb[,1:50]) ## add some unreferenced vertices
points3d(vert2points(testmesh),col=2)## see the vertices in the holes?
cleanmesh <- rmUnrefVertex(testmesh)## remove those lonely vertices!
rgl.pop()
points3d(vert2points(cleanmesh),col=2) ### now the holes are empty!!
Run the code above in your browser using DataLab