From: akl Date: Fri, 17 May 2013 12:26:06 +0000 (+0000) Subject: Fix to take into account qudratic edges also. X-Git-Tag: V7_3_0a1~435 X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=commitdiff_plain;h=e69867dda8cb507785203efa283ad21baf5ff023;ds=sidebyside Fix to take into account qudratic edges also. --- diff --git a/src/OBJECT/SMESH_Object.cxx b/src/OBJECT/SMESH_Object.cxx index c4ddc1cd0..b4fcbf6db 100644 --- a/src/OBJECT/SMESH_Object.cxx +++ b/src/OBJECT/SMESH_Object.cxx @@ -523,7 +523,7 @@ bool SMESH_VisualObjDef::GetEdgeNodes( const int theElemId, if ( anElem == 0 ) return false; - int nbNodes = anElem->NbNodes(); + int nbNodes = anElem->NbCornerNodes(); if ( theEdgeNum < 0 || theEdgeNum > 3 || (nbNodes != 3 && nbNodes != 4) || theEdgeNum > nbNodes ) return false; @@ -531,7 +531,7 @@ bool SMESH_VisualObjDef::GetEdgeNodes( const int theElemId, vector anIds( nbNodes ); SMDS_ElemIteratorPtr anIter = anElem->nodesIterator(); int i = 0; - while( anIter->more() ) + while( anIter->more() && i < nbNodes ) anIds[ i++ ] = anIter->next()->GetID(); if ( theEdgeNum < nbNodes - 1 ) diff --git a/src/SMESHGUI/SMESHGUI_SingleEditDlg.cxx b/src/SMESHGUI/SMESHGUI_SingleEditDlg.cxx index db7aafdb4..8059552fe 100755 --- a/src/SMESHGUI/SMESHGUI_SingleEditDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_SingleEditDlg.cxx @@ -305,7 +305,7 @@ static bool findTriangles (const SMDS_MeshNode * theNode1, SMDS_ElemIteratorPtr it = theNode1->GetInverseElementIterator(); while (it->more()) { const SMDS_MeshElement* elem = it->next(); - if (elem->GetType() == SMDSAbs_Face && elem->NbNodes() == 3) + if (elem->GetType() == SMDSAbs_Face && elem->NbCornerNodes() == 3) emap.insert(elem); } it = theNode2->GetInverseElementIterator();