The MESH_VALIDATE function checks for NaN values in vertices, removes unused vertices, and combines close vertices.

Syntax


Result = MESH_VALIDATE ( Verts, Conn [, /REMOVE_NAN] [, /PACK_VERTICES] [, /COMBINE_VERTICES] [, TOLERANCE=value] )

Return Value


The function return value is the number of triangles in the modified polygonal mesh connectivity array.

Arguments


Verts

Input/Output array of polygonal vertices [3, n]. These are potentially modified and returned to the user. If Verts is a double precision array then IDL uses double precision for the computations and returns a double-precision array. Otherwise, IDL uses single precision for the computations and returns a single-precision array.

Conn

Input/Output polygonal mesh connectivity array. This array is modified and returned to the user. On output, the connectivity array describes a triangular mesh.

Keywords


COMBINE_VERTICES

If this keyword is set, the routine will attempt to collapse vertices which are at the same location in space into single vertices. If the expression

is true, the points (i) and (i+1) can be collapsed into a single vertex. The result is returned as a modification of the Verts argument.

PACK_VERTICES

If this keyword is set, the Verts input array will be packed to exclude any non-referenced vertices. The result is returned in the Verts argument.

REMOVE_NAN

If this keyword is set, the function will remove any polygons from CONN which reference vertices containing NaN values.

TOLERANCE

This keyword is used to specify the tolerance value used with the COMBINE_VERTS keyword. The default value is 1e-8.

Version History


5.5

Introduced

8.6

Add support for double-precision input.

See Also


MESH_CLIP, MESH_DECIMATE, MESH_ISSOLID, MESH_MERGE, MESH_NUMTRIANGLES, MESH_OBJ, MESH_SMOOTH, MESH_SURFACEAREA, MESH_VOLUME