]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
0022100: EDF 2413 SMESH: Take into account TRIA7
authoreap <eap@opencascade.com>
Thu, 16 May 2013 16:33:34 +0000 (16:33 +0000)
committereap <eap@opencascade.com>
Thu, 16 May 2013 16:33:34 +0000 (16:33 +0000)
Fix AddNode() for the case if a node already in

src/SMESHDS/SMESHDS_SubMesh.cxx

index 76b131c89fff767bb55c533d616bc04a5cc036b3..b27ea7b4f520c237d70566a1ab0b241ec2a0132c 100644 (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