Salome HOME
Make extrusions features correctly eat as a base a whole sketch feature selection.
[modules/shaper.git] / src / FeaturesPlugin / FeaturesPlugin_Boolean.cpp
index 7a765a11c74412b503e7a2a4f9235bd05dc85741..99afc6e8dbf6d78c1c37838d639f26fad7caf9f4 100644 (file)
@@ -24,7 +24,6 @@
 #include <ModelAPI_Document.h>
 #include <ModelAPI_AttributeReference.h>
 #include <ModelAPI_AttributeInteger.h>
-#include <ModelAPI_ResultCompSolid.h>
 #include <ModelAPI_ResultBody.h>
 #include <ModelAPI_AttributeSelectionList.h>
 #include <ModelAPI_Session.h>
@@ -100,7 +99,7 @@ void FeaturesPlugin_Boolean::execute()
       return;
     }
     ResultPtr aContext = anObjectAttr->context();
-    ResultCompSolidPtr aResCompSolidPtr = ModelAPI_Tools::compSolidOwner(aContext);
+    ResultBodyPtr aResCompSolidPtr = ModelAPI_Tools::bodyOwner(aContext);
     if(aResCompSolidPtr.get()
         && aResCompSolidPtr->shape()->shapeType() == GeomAPI_Shape::COMPSOLID) {
       std::shared_ptr<GeomAPI_Shape> aContextShape = aResCompSolidPtr->shape();
@@ -208,7 +207,7 @@ void FeaturesPlugin_Boolean::execute()
 
             aBoolAlgo.reset(new GeomAlgoAPI_Partition(aListWithObject, aToolsWithPlanes));
             aResShape = aBoolAlgo->shape();
-            if(aResShape->shapeType() == GeomAPI_Shape::COMPOUND) {
+            if (aResShape.get() && aResShape->shapeType() == GeomAPI_Shape::COMPOUND) {
               int aSubResultsNb = 0;
               GeomAPI_ShapeIterator anIt(aResShape);
               for(; anIt.more(); anIt.next()) {