From: mpv Date: Mon, 22 Oct 2018 11:39:09 +0000 (+0300) Subject: Debug the sketcher update and projections behavior basin on Test1816 X-Git-Tag: End2018~283 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=27cb0900433265b6f49a3c991a0b9262f2d8e706;p=modules%2Fshaper.git Debug the sketcher update and projections behavior basin on Test1816 --- diff --git a/src/Model/Model_Document.cpp b/src/Model/Model_Document.cpp index d71b770c7..6fc16f5cf 100755 --- a/src/Model/Model_Document.cpp +++ b/src/Model/Model_Document.cpp @@ -1493,8 +1493,13 @@ bool Model_Document::isLaterByDep(FeaturePtr theThis, FeaturePtr theOther) { if (!aRefFeat.get()) { // take feature of the result aRefFeat = feature(std::dynamic_pointer_cast(aRefObj)); } - if (aRefFeat.get() && aRefFeat == theThis) { - return false; // other references to this, so other later than this + if (aRefFeat.get()) { + if (aRefFeat == theThis) + return false; // other references to this, so other later than this + if (std::dynamic_pointer_cast(aRefFeat)) { + if (!isLaterByDep(theThis, aRefFeat)) // nested composites: recursion + return false; + } } } } diff --git a/src/Selector/Selector_Selector.cpp b/src/Selector/Selector_Selector.cpp index 8036f9d1d..54c8aca55 100644 --- a/src/Selector/Selector_Selector.cpp +++ b/src/Selector/Selector_Selector.cpp @@ -251,7 +251,22 @@ bool Selector_Selector::select(const TopoDS_Shape theContext, const TopoDS_Shape return false; // check the value shape can be named as it is, or it is needed to construct it from the // higher level shapes (like a box vertex by faces that form this vertex) - if (!TNaming_Tool::HasLabel(myLab, theValue)) { + bool aIsFound = TNaming_Tool::HasLabel(myLab, theValue); + if (aIsFound) { // additional check for selection and delete evolution only: also could not be used + aIsFound = false; + for(TNaming_SameShapeIterator aShapes(theValue, myLab); aShapes.More(); aShapes.Next()) + { + Handle(TNaming_NamedShape) aNS; + if (aShapes.Label().FindAttribute(TNaming_NamedShape::GetID(), aNS)) { + if (aNS->Evolution() == TNaming_MODIFY || aNS->Evolution() == TNaming_GENERATED || + aNS->Evolution() == TNaming_PRIMITIVE) { + aIsFound = true; + break; + } + } + } + } + if (!aIsFound) { TopAbs_ShapeEnum aSelectionType = theValue.ShapeType(); myShapeType = aSelectionType; if (aSelectionType == TopAbs_COMPOUND || aSelectionType == TopAbs_COMPSOLID ||