#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>
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();
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()) {