Salome HOME
INT PAL 0052683: Parameter "Color group" in the "Create Group" dialog box is empty
[modules/smesh.git] / src / SMDS / SMDS_UnstructuredGrid.cxx
index 99d39e4f08bda5a155263da05df9f94f24be8ddf..5fe82a432a7cd65a17750e81df074b22c043cecf 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2010-2015  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
-// 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
@@ -24,6 +24,7 @@
 #include "SMDS_MeshVolume.hxx"
 
 #include "utilities.h"
+#include "chrono.hxx"
 
 #include <vtkCellArray.h>
 #include <vtkCellData.h>
@@ -1081,8 +1082,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();
-              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);