Salome HOME
Fix exception when collecting shells for compsolids
authordbv <dbv@opencascade.com>
Mon, 24 Aug 2015 15:51:01 +0000 (18:51 +0300)
committerdbv <dbv@opencascade.com>
Tue, 25 Aug 2015 06:18:18 +0000 (09:18 +0300)
src/FeaturesPlugin/FeaturesPlugin_CompositeBoolean.cpp
src/FeaturesPlugin/FeaturesPlugin_Extrusion.cpp
src/FeaturesPlugin/FeaturesPlugin_Revolution.cpp

index f0876e1f12201d16fa004018d7297f07b0b6918c..261a329315c4958b2634542490732ed641a210b8 100644 (file)
@@ -126,13 +126,11 @@ void FeaturesPlugin_CompositeBoolean::execute()
   ListOfShape aFreeFaces;
   std::shared_ptr<GeomAPI_Shape> aFacesCompound = GeomAlgoAPI_CompoundBuilder::compound(aFacesList);
   GeomAlgoAPI_ShapeTools::combineShapes(aFacesCompound, GeomAPI_Shape::SHELL, aShells, aFreeFaces);
-  if(aShells.empty()) {
-    aShells = aFreeFaces;
-  } else {
-    aShells.merge(aFreeFaces);
+  for(ListOfShape::const_iterator anIter = aFreeFaces.cbegin(); anIter != aFreeFaces.cend(); anIter++) {
+    aShells.push_back(*anIter);
   }
 
-  // Pass shells/faces to soldis creation function.
+  // Pass shells/faces to solids creation function.
   ListOfShape aBooleanTools;
   std::list<std::shared_ptr<GeomAPI_Interface>> aSolidsAlgos;
   makeSolids(aShells, aBooleanTools, aSolidsAlgos);
index 09e3e3c14af4497b24338043ca264381b9711c04..f76a684602255745e58703aa983a288aee70b138 100644 (file)
@@ -133,10 +133,8 @@ void FeaturesPlugin_Extrusion::execute()
   ListOfShape aFreeFaces;
   std::shared_ptr<GeomAPI_Shape> aFacesCompound = GeomAlgoAPI_CompoundBuilder::compound(aFacesList);
   GeomAlgoAPI_ShapeTools::combineShapes(aFacesCompound, GeomAPI_Shape::SHELL, aShells, aFreeFaces);
-  if(aShells.empty()) {
-    aShells = aFreeFaces;
-  } else {
-    aShells.merge(aFreeFaces);
+  for(ListOfShape::const_iterator anIter = aFreeFaces.cbegin(); anIter != aFreeFaces.cend(); anIter++) {
+    aShells.push_back(*anIter);
   }
 
   // Generating result for each shell and face.
index 52b00ffc1400fed5daded1ef1031e172995f6f09..503c1c8a9232c007df9cd84a29c10735df5cacee 100644 (file)
@@ -143,10 +143,8 @@ void FeaturesPlugin_Revolution::execute()
   ListOfShape aFreeFaces;
   std::shared_ptr<GeomAPI_Shape> aFacesCompound = GeomAlgoAPI_CompoundBuilder::compound(aFacesList);
   GeomAlgoAPI_ShapeTools::combineShapes(aFacesCompound, GeomAPI_Shape::SHELL, aShells, aFreeFaces);
-  if(aShells.empty()) {
-    aShells = aFreeFaces;
-  } else {
-    aShells.merge(aFreeFaces);
+  for(ListOfShape::const_iterator anIter = aFreeFaces.cbegin(); anIter != aFreeFaces.cend(); anIter++) {
+    aShells.push_back(*anIter);
   }
 
   // Generating result for each shell and face.