return aVisible;
}
+bool isSubObject(const ObjectPtr& theObject, const FeaturePtr& theFeature)
+{
+ bool isSub = false;
+ CompositeFeaturePtr aComposite = std::dynamic_pointer_cast<ModelAPI_CompositeFeature>(theFeature);
+ if (aComposite.get())
+ isSub = aComposite->isSub(theObject);
+
+ return isSub;
+}
+
void addValue(const ObjectPtr& theObject, const GeomShapePtr& theShape,
QMap<ObjectPtr, QList<GeomShapePtr> >& theObjectShapes)
{
GeomShapePtr aShape = aSelAttribute->value();
if (!aShape.get())
aShape = aResult->shape();
- addValue(aResult, aShape, theObjectShapes);
+ if (!isSubObject(aResult, myFeature))
+ addValue(aResult, aShape, theObjectShapes);
}
}
else {
if (aResult.get())
aShape = aResult->shape();
}
- addValue(anObject, aShape, theObjectShapes);
+ if (!isSubObject(anObject, myFeature))
+ addValue(anObject, aShape, theObjectShapes);
}
}
}