#include <ModelAPI_AttributeSelectionList.h>
#include <ModelAPI_AttributeString.h>
#include <ModelAPI_ResultBody.h>
-#include <ModelAPI_ResultCompSolid.h>
#include <ModelAPI_Session.h>
#include <ModelAPI_Tools.h>
#include <ModelAPI_Validator.h>
return;
ResultPtr aContext = anObjectAttr->context();
- ResultCompSolidPtr aCtxOwner = ModelAPI_Tools::compSolidOwner(aContext);
- GeomShapePtr aParent = aCtxOwner ? aCtxOwner->shape() : aContext->shape();
+ GeomShapePtr aParent;
+ if (aContext.get()) {
+ ResultBodyPtr aCtxOwner = ModelAPI_Tools::bodyOwner(aContext);
+ aParent = aCtxOwner ? aCtxOwner->shape() : aContext->shape();
+ } else { // get it from a feature
+ FeaturePtr aFeature = anObjectAttr->contextFeature();
+ if (aFeature.get()) {
+ aParent = aFeature->firstResult()->shape();
+ }
+ }
if (!aParent)
return;
const int aSubsolidsTag = 4;
theResultBody->storeModified(theBaseShape, theResultShape, aSubsolidsTag);
- theResultBody->storeGenerated(theBaseShape, theResultShape);
const std::string aModFaceName = "Modified_Face";
const std::string aFilletFaceName = "Fillet_Face";