Bug 0020185: EDF SMESH 967 : Anomaly in Merge Nodes.

This commit is contained in:
jfa 2009-03-02 14:57:49 +00:00
parent 5caaedcd2a
commit 8b7cb7f71d

View File

@ -4863,6 +4863,25 @@ void SMESH_MeshEditor::MergeNodes (TListOfListOfNodes & theGroupsOfNodes)
TNodeNodeMap::iterator nnIt = nodeNodeMap.find( n );
if ( nnIt != nodeNodeMap.end() ) { // n sticks
n = (*nnIt).second;
// BUG 0020185: begin
{
bool stopRecur = false;
set<const SMDS_MeshNode*> nodesRecur;
nodesRecur.insert(n);
while (!stopRecur) {
TNodeNodeMap::iterator nnIt_i = nodeNodeMap.find( n );
if ( nnIt_i != nodeNodeMap.end() ) { // n sticks
n = (*nnIt_i).second;
if (!nodesRecur.insert(n).second) {
// error: recursive dependancy
stopRecur = true;
}
}
else
stopRecur = true;
}
}
// BUG 0020185: end
iRepl[ nbRepl++ ] = iCur;
}
curNodes[ iCur ] = n;