From: jfa Date: Mon, 2 Mar 2009 14:57:49 +0000 (+0000) Subject: Bug 0020185: EDF SMESH 967 : Anomaly in Merge Nodes. X-Git-Tag: V4_1_5rc1~30 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=8b7cb7f71dc5825e527bc35aff653d54f9c62e2e;p=modules%2Fsmesh.git Bug 0020185: EDF SMESH 967 : Anomaly in Merge Nodes. --- diff --git a/src/SMESH/SMESH_MeshEditor.cxx b/src/SMESH/SMESH_MeshEditor.cxx index 487646ed9..77226dbbb 100644 --- a/src/SMESH/SMESH_MeshEditor.cxx +++ b/src/SMESH/SMESH_MeshEditor.cxx @@ -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 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;