]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/Model/Model_ResultCompSolid.cpp
Salome HOME
Issue #2192 : change the naming principles of compsolid in case of Partition to make...
[modules/shaper.git] / src / Model / Model_ResultCompSolid.cpp
index c613cd29f3d88b13eb75a473781ff7e8dda03cd7..e97a541bb4f24fff552e5d35cedb3d1783bf0cd6 100755 (executable)
@@ -1,8 +1,22 @@
-// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
-
-// File:        Model_ResultCompSolid.cpp
-// Created:     20 Jul 2015
-// Author:      Natalia ERMOLAEVA
+// Copyright (C) 2014-2017  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<mailto:webmaster.salome@opencascade.com>
+//
 
 #include <Model_ResultCompSolid.h>
 
@@ -51,6 +65,27 @@ void Model_ResultCompSolid::storeModified(const std::shared_ptr<GeomAPI_Shape>&
   updateSubs(theNewShape);
 }
 
+void Model_ResultCompSolid::loadAndOrientModifiedShapes (GeomAlgoAPI_MakeShape* theMS,
+    std::shared_ptr<GeomAPI_Shape>  theShapeIn, const int  theKindOfShape, const int  theTag,
+    const std::string& theName, GeomAPI_DataMapOfShapeShape& theSubShapes,
+    const bool theIsStoreSeparate,
+    const bool theIsStoreAsGenerated)
+{
+  if (mySubs.size()) { // consists of subs
+    std::vector<std::shared_ptr<ModelAPI_ResultBody> >::const_iterator aSubIter = mySubs.cbegin();
+    for(; aSubIter != mySubs.cend(); aSubIter++) {
+      (*aSubIter)->loadAndOrientModifiedShapes(
+        theMS, theShapeIn, theKindOfShape, theTag, theName, theSubShapes, theIsStoreSeparate,
+        theIsStoreAsGenerated);
+    }
+  } else { // do for this directly
+    ModelAPI_ResultCompSolid::loadAndOrientModifiedShapes(
+    theMS, theShapeIn, theKindOfShape, theTag, theName, theSubShapes, theIsStoreSeparate,
+    theIsStoreAsGenerated);
+  }
+}
+
+
 int Model_ResultCompSolid::numberOfSubs(bool forTree) const
 {
   return int(mySubs.size());