From: mpv Date: Fri, 11 Sep 2015 17:37:06 +0000 (+0300) Subject: FIx for the issue #951 X-Git-Tag: V_1.4.0_beta4~6 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=69290817c24cb8b9d240129d8573b46807a007ef;p=modules%2Fshaper.git FIx for the issue #951 --- diff --git a/src/Model/Model_AttributeSelection.cpp b/src/Model/Model_AttributeSelection.cpp index f97b97e4a..a46a49662 100644 --- a/src/Model/Model_AttributeSelection.cpp +++ b/src/Model/Model_AttributeSelection.cpp @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -316,8 +317,16 @@ TDF_LabelMap& Model_AttributeSelection::scope() std::list > allFeatures = aMyDoc->allFeatures(); std::list >::iterator aFIter = allFeatures.begin(); bool aMePassed = false; - std::shared_ptr aComposite = + CompositeFeaturePtr aComposite = std::dynamic_pointer_cast(owner()); + FeaturePtr aFeature = std::dynamic_pointer_cast(owner()); + CompositeFeaturePtr aCompositeOwner, aCompositeOwnerOwner; + if (aFeature.get()) { + aCompositeOwner = ModelAPI_Tools::compositeOwner(aFeature); + if (aCompositeOwner.get()) { + aCompositeOwnerOwner = ModelAPI_Tools::compositeOwner(aCompositeOwner); + } + } for(; aFIter != allFeatures.end(); aFIter++) { if (*aFIter == owner()) { // the left features are created later (except subs of composite) aMePassed = true; @@ -328,6 +337,10 @@ TDF_LabelMap& Model_AttributeSelection::scope() if (aComposite->isSub(*aFIter)) isInScope = true; } + // remove the composite-owner of this feature (sketch in extrusion-cut) + if (isInScope && (aCompositeOwner == *aFIter || aCompositeOwnerOwner == *aFIter)) + isInScope = false; + if (isInScope && aFIter->get() && (*aFIter)->data()->isValid()) { TDF_Label aFeatureLab = std::dynamic_pointer_cast( (*aFIter)->data())->label().Father();