0022100: EDF 2413 SMESH: Take into account TRIA7

Fix AddNode() for the case if a node already in
This commit is contained in:
eap 2013-05-16 16:33:34 +00:00
parent 30c56009c3
commit f377659e82

View File

@ -160,14 +160,14 @@ void SMESHDS_SubMesh::AddNode(const SMDS_MeshNode * N)
{
if ( !IsComplexSubmesh() )
{
int idInSubShape = N->getIdInShape();
int shapeId = N->getshapeId();
const int idInSubShape = N->getIdInShape();
const int shapeId = N->getshapeId();
if ((shapeId > 0) && (idInSubShape >= 0))
{
if ( shapeId != myIndex )
throw SALOME_Exception
(LOCALIZED("a node being in sub-mesh is added to another sub-mesh"));
if ( idInSubShape >= NbNodes() || myNodes[ idInSubShape ] != N )
if ( idInSubShape >= myNodes.size() || myNodes[ idInSubShape ] != N )
throw SALOME_Exception
(LOCALIZED("a node with wrong idInSubShape is re-added to the same sub-mesh"));
return; // already in