From: dbv Date: Mon, 24 Aug 2015 15:51:01 +0000 (+0300) Subject: Fix exception when collecting shells for compsolids X-Git-Tag: V_1.4.0_beta4~264 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=3a3609cb2e2f171082ca2e807e6c8c8ba24d1075;p=modules%2Fshaper.git Fix exception when collecting shells for compsolids --- diff --git a/src/FeaturesPlugin/FeaturesPlugin_CompositeBoolean.cpp b/src/FeaturesPlugin/FeaturesPlugin_CompositeBoolean.cpp index f0876e1f1..261a32931 100644 --- a/src/FeaturesPlugin/FeaturesPlugin_CompositeBoolean.cpp +++ b/src/FeaturesPlugin/FeaturesPlugin_CompositeBoolean.cpp @@ -126,13 +126,11 @@ void FeaturesPlugin_CompositeBoolean::execute() ListOfShape aFreeFaces; std::shared_ptr 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> aSolidsAlgos; makeSolids(aShells, aBooleanTools, aSolidsAlgos); diff --git a/src/FeaturesPlugin/FeaturesPlugin_Extrusion.cpp b/src/FeaturesPlugin/FeaturesPlugin_Extrusion.cpp index 09e3e3c14..f76a68460 100644 --- a/src/FeaturesPlugin/FeaturesPlugin_Extrusion.cpp +++ b/src/FeaturesPlugin/FeaturesPlugin_Extrusion.cpp @@ -133,10 +133,8 @@ void FeaturesPlugin_Extrusion::execute() ListOfShape aFreeFaces; std::shared_ptr 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. diff --git a/src/FeaturesPlugin/FeaturesPlugin_Revolution.cpp b/src/FeaturesPlugin/FeaturesPlugin_Revolution.cpp index 52b00ffc1..503c1c8a9 100644 --- a/src/FeaturesPlugin/FeaturesPlugin_Revolution.cpp +++ b/src/FeaturesPlugin/FeaturesPlugin_Revolution.cpp @@ -143,10 +143,8 @@ void FeaturesPlugin_Revolution::execute() ListOfShape aFreeFaces; std::shared_ptr 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.