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;
vector<int> 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 )
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();