Salome HOME
pre: fix bug EDF 7854: src/SMDS/SMDS_UnstructuredGrid.cxx SMDS_UnstructuredGrid:...
[modules/smesh.git] / src / SMDS / SMDS_UnstructuredGrid.cxx
index 99d39e4f08bda5a155263da05df9f94f24be8ddf..6012a4f38595e5d3befeb7539b86b784a7796395 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2010-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 // License as published by the Free Software Foundation; either
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 // License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -1081,8 +1081,11 @@ SMDS_MeshCell* SMDS_UnstructuredGrid::extrudeVolumeFromFace(int vtkVolId,
               double *coords = this->GetPoint(oldId);
               SMDS_MeshNode *newNode = _mesh->AddNode(coords[0], coords[1], coords[2]);
               newId = newNode->getVtkId();
               double *coords = this->GetPoint(oldId);
               SMDS_MeshNode *newNode = _mesh->AddNode(coords[0], coords[1], coords[2]);
               newId = newNode->getVtkId();
-              std::map<long, int> emptyMap;
-              nodeQuadDomains[oldId] = emptyMap;
+              if (! nodeQuadDomains.count(oldId))
+                {
+                  std::map<long, int> emptyMap;
+                  nodeQuadDomains[oldId] = emptyMap;
+                }
               nodeQuadDomains[oldId][dom1_2] = newId;
             }
           orderedNodes.push_back(newId);
               nodeQuadDomains[oldId][dom1_2] = newId;
             }
           orderedNodes.push_back(newId);