cleanupGeometry operation
Synopsis
cleanupGeometry(componentSelector, tol)
Parameters
 componentSelector (selstr)
What components to clean up: vertices: merges vertices and removes collinear vertices.
 edges: merges vertices and removes shared edges between coplanar faces.
 faces: merges vertices and removes duplicate faces and degenerated faces with small area.
 all: cleans up all components.
 tol (float)
Controls the rigorousness of the cleanup operation. Valid values are in the range [0, 1]. While 0 only cleans up matching components (e.g. vertices with identical coordinates are merged or adjacent faces with identical normals are combined), 1 is more aggressive: vertices up to a distance of 1m are merged, and normals with intermediate angles up to 10 degrees are considered coplanar. For values inbetween 0 and 1 linear interpolation is applied.
The cleanupGeometry operation cleans up the current shape's geometry. This allows for optimizing the geometry for subsequent cga operations.
Related
 convexify operation
 innerRectangle operation
 mirror operation
 reduceGeometry operation
 reverseNormals operation
 setNormals operation
 trim operation
Examples
Cleaning up a triangulated asset
Init> i("myHouse.dae") The original asset (464 faces, 758 vertices). 

Init> i("myHouse.dae") cleanupGeometry(all, 0) Mild cleanup removes most disturbing edges (190 faces, 752 vertices). 

Init> i("myHouse.dae") cleanupGeometry(all, 0.1) Increasing the tolerance gets rid of the remaining nasty edges (146 faces, 616 vertices). 
Copyright ©20082016 Esri R&D Center Zurich. All rights reserved.