X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FOBJECT%2FSMESH_Object.cxx;h=1767ddf37aea235c507d102de4d7b11d6c02a3b0;hb=02ac54c6f33c5437c1d2204d704cf3da6fd31a8e;hp=bcb58993708aa9c89fc7ad7c18a2c68c6efd8be8;hpb=8972ce9d8445b6f859176d894c22b62499bf5616;p=modules%2Fsmesh.git diff --git a/src/OBJECT/SMESH_Object.cxx b/src/OBJECT/SMESH_Object.cxx index bcb589937..1767ddf37 100644 --- a/src/OBJECT/SMESH_Object.cxx +++ b/src/OBJECT/SMESH_Object.cxx @@ -559,22 +559,8 @@ bool SMESH_VisualObjDef::GetEdgeNodes( const int theElemId, if ( theEdgeNum < 0 || theEdgeNum > 3 || (nbNodes != 3 && nbNodes != 4) || theEdgeNum > nbNodes ) return false; - vector anIds( nbNodes ); - SMDS_ElemIteratorPtr anIter = anElem->nodesIterator(); - int i = 0; - while( anIter->more() && i < nbNodes ) - anIds[ i++ ] = anIter->next()->GetID(); - - if ( theEdgeNum < nbNodes - 1 ) - { - theNodeId1 = anIds[ theEdgeNum ]; - theNodeId2 = anIds[ theEdgeNum + 1 ]; - } - else - { - theNodeId1 = anIds[ nbNodes - 1 ]; - theNodeId2 = anIds[ 0 ]; - } + theNodeId1 = anElem->GetNode( theEdgeNum - 1 )->GetID(); + theNodeId2 = anElem->GetNode( theEdgeNum % nbNodes )->GetID(); return true; }