0019957: EDF 785 SMESH: Convert Quadratic and Group on GEOM

Avoid endless recursing in FindCoincidentNodes() function (causing crash)
This commit is contained in:
vsr 2011-10-14 15:09:47 +00:00
parent 4df44f5a1e
commit 26bfcad40a

View File

@ -249,7 +249,9 @@ void SMESH_OctreeNode::FindCoincidentNodes (TIDSortedNodeSet& theSetOfNodes,
const int maxLevel,
const int maxNbNodes)
{
SMESH_OctreeNode theOctreeNode(theSetOfNodes, maxLevel, maxNbNodes, theTolerance);
// VSR 14/10/2011: limit max number of the levels in order to avoid endless recursing
const int MAX_LEVEL = 10;
SMESH_OctreeNode theOctreeNode(theSetOfNodes, maxLevel < 0 ? MAX_LEVEL : maxLevel, maxNbNodes, theTolerance);
theOctreeNode.FindCoincidentNodes (&theSetOfNodes, theTolerance, theGroupsOfNodes);
}