Salome HOME
Issue #2923: Change sketch plane
[modules/shaper.git] / src / GDMLPlugin / GDMLPlugin_ConeSegment.cpp
index bbc4adecc4c512adefefc0895c931f24d943a774..cd7874f9caa05661115d5ab54e1b81709e9c13be 100644 (file)
@@ -1,15 +1,27 @@
-// Copyright (C) 2014-2016 CEA/DEN, EDF R&D
-
-// File:        GDMLPlugin_ConeSegment.cpp
-// Created:     23 Nov 2016
-// Author:      Clarisse Genrault (CEA)
+// Copyright (C) 2014-2019  CEA/DEN, EDF R&D
+//
+// 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, 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
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
 
 #include <GDMLPlugin_ConeSegment.h>
 
 #include <ModelAPI_Data.h>
 #include <ModelAPI_ResultBody.h>
 #include <ModelAPI_AttributeDouble.h>
-#include <ModelAPI_AttributeString.h>
 
 //=================================================================================================
 GDMLPlugin_ConeSegment::GDMLPlugin_ConeSegment() // Nothing to do during instantiation
@@ -81,13 +93,13 @@ void GDMLPlugin_ConeSegment::loadNamingDS(
   theConeSegmentAlgo->prepareNamingFaces();
 
   // Insert to faces
-  int num = 1;
   std::map< std::string, std::shared_ptr<GeomAPI_Shape> > listOfFaces =
     theConeSegmentAlgo->getCreatedFaces();
-  for (std::map< std::string, std::shared_ptr<GeomAPI_Shape> >::iterator
-       it=listOfFaces.begin(); it!=listOfFaces.end(); ++it) {
-    std::shared_ptr<GeomAPI_Shape> aFace = (*it).second;
-    theResultConeSegment->generated(aFace, (*it).first, num++);
+  for (std::map< std::string, std::shared_ptr<GeomAPI_Shape> >::iterator it = listOfFaces.begin();
+       it != listOfFaces.end();
+       ++it)
+  {
+    theResultConeSegment->generated((*it).second, (*it).first);
   }
 }