}*/
(*aSubIter)->loadAndOrientModifiedShapes(
theMS, theShapeIn, theKindOfShape, theTag, theName, theSubShapes, theIsStoreSeparate,
- theIsStoreAsGenerated);
+ theIsStoreAsGenerated, theSplitInSubs);
}
} else { // do for this directly
- myBuilder->loadAndOrientGeneratedShapes(
- theMS, theShapeIn, theKindOfShape, theTag, theName, theSubShapes);
+ myBuilder->loadAndOrientModifiedShapes(
+ theMS, theShapeIn, theKindOfShape, theTag, theName, theSubShapes, theIsStoreSeparate,
+ theIsStoreAsGenerated);
}
}
ResultBodyPtr Model_ResultBody::subResult(const int theIndex, bool forTree) const
{
+ if (theIndex >= int(mySubs.size()))
+ return ResultBodyPtr();
return mySubs.at(theIndex);
}
if (myLastConcealed != ModelAPI_ResultBody::isConcealed()) {
// check the whole tree of results: if one is concealed, everybody are concealed
ResultBodyPtr anOwner = std::dynamic_pointer_cast<ModelAPI_ResultBody>(data()->owner());
+ if (!anOwner.get())
+ return; // "this" is invalid
ResultBodyPtr aParent = ModelAPI_Tools::bodyOwner(anOwner);
while(aParent.get()) {
anOwner = aParent;