API Reference > OdDb Classes > OdDbMPolygon Class > OdDbMPolygon Methods > OdDbMPolygon::balanceTree Method
OdDbMPolygon::balanceTree Method
Syntax
C++
virtual OdResult balanceTree();

eOk if checks and changes are successful, or eInvalidInput if getMPolygonTree() does not generate a tree.

Checks the direction of the loops and changes it to the correct one. The directivity check is based on the resulting tree from getMPolygonTree. Where the depth of the tree indicates the direction of the loop (even values are counterclockwise, odd are clockwise). If in MPolygon there are loops that are not displayed (invalid), they will be marked again as valid (and will be drawn) if they do not intersect with others. Also the check is done for intersections of the displayed (valid) loops. Intersected loops are marked as invalid, and they will not be drawn. 

 

Copyright © 2002–2021. Open Design Alliance. All rights reserved.