Vision and Mobile Robotics Laboratory | Software
|
|
Home | Members | Projects | Publications | Software | Videos | Internal |
CleanMesh is a program for cleaning up meshes. It removes vertices of degree less than three (removes isolated vertices and dangling edges), small disconnected surface patches and edges in the mesh that are too long.
main.c main control function which calls the CleanMesh function (located in surfaceMesh.c) repeatedly until CleanMesh has no effect on the mesh.
By typing 'CleanMesh -' the following options (format description default) are printed:
Usage: CleanMesh (see CleanMesh.html for complete usage)
%S in mesh filename [required]
%S out mesh filename [required] -step step only once through cleaning [off]
-step step only once through cleaning [off]
-rel_mel %F relative maximun edge length left in mesh [8]
-abs_mel %F absolute maximun edge length left in mesh [8]
-mps %d minimum patch size in vertices [10]
-rb remove boundary [off]
%S in mesh filename [required]
The name of the VRML indexed face set filename that you would like to clean.
%S out mesh filename [required]
The name of the VRML indexed face set filename that is output
-step step only once through cleaning [off]
Engage this option if you only want to run the cleaning option once. Pretty useless.
-rel_mel %F relative maximun edge length left in mesh [8]
Set the maximum edge length left in the mesh as a function of the average meshedge length in the mesh before cleaning. I.e., -rel_mel 10 will set the maximum edge length to be 10 times the average edge length.
-abs_mel %F absolute maximun edge length left in mesh [8]
Set the maximum edge length based on absolute units.
-mps %d minimum patch size in vertices [10]
Set the minimum size of a disconnected patch that will be kept in the mesh after cleaning.
-rb remove boundary [off]
If this flag is set then the boundary of the mesh (vertices on edges that are adjacent to only one face) will be removed. The purpose of this flag is to remove mixed pixels which generally occur on the boundaries of meshes.
An example of the minimum usage is:
CleanMesh duck0.wrl duck0.clean.wrl
To make a mesh have no edges longer than 4 units and no disconnected patches with count less than 100 vertices:
CleanMesh duck0.wrl duck0.clean.wrl -abs_mel 4 -mps 100