From: eap Date: Thu, 16 May 2013 16:33:34 +0000 (+0000) Subject: 0022100: EDF 2413 SMESH: Take into account TRIA7 X-Git-Tag: V7_3_0a1~466 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f377659e8246493e9e4617df27bab0cd56f10405;p=modules%2Fsmesh.git 0022100: EDF 2413 SMESH: Take into account TRIA7 Fix AddNode() for the case if a node already in --- diff --git a/src/SMESHDS/SMESHDS_SubMesh.cxx b/src/SMESHDS/SMESHDS_SubMesh.cxx index 76b131c89..b27ea7b4f 100644 --- a/src/SMESHDS/SMESHDS_SubMesh.cxx +++ b/src/SMESHDS/SMESHDS_SubMesh.cxx @@ -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