From: mpv Date: Wed, 10 Apr 2019 06:02:29 +0000 (+0300) Subject: For the issue #2903 : correctly process also the references to construction - features. X-Git-Tag: V9_3_0rc1^2~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=c57e58a00e7e9dd22c8872eb652c624f9176f119;p=modules%2Fshaper.git For the issue #2903 : correctly process also the references to construction - features. --- diff --git a/src/FeaturesPlugin/Test/TestRemoveSubShapes3.py b/src/FeaturesPlugin/Test/TestRemoveSubShapes3.py index 87dc9185b..c159dbe56 100644 --- a/src/FeaturesPlugin/Test/TestRemoveSubShapes3.py +++ b/src/FeaturesPlugin/Test/TestRemoveSubShapes3.py @@ -30,7 +30,8 @@ Part_1_doc = Part_1.document() Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10) Face_1 = model.addFace(Part_1_doc, [model.selection("FACE", "Cylinder_1_1/Face_1")]) -Face_2 = model.addFace(Part_1_doc, [model.selection("FACE", "Cylinder_1_1/Face_1")]) +Cylinder_2 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10) +Face_2 = model.addFace(Part_1_doc, [model.selection("FACE", "Cylinder_2_1/Face_1")]) Translation_1 = model.addTranslation(Part_1_doc, [model.selection("FACE", "Face_2_1")], model.selection("EDGE", "PartSet/OZ"), 10) Shell_1 = model.addShell(Part_1_doc, [model.selection("FACE", "Translation_1_1"), model.selection("FACE", "Face_1_1")]) diff --git a/src/Model/Model_AttributeValidator.cpp b/src/Model/Model_AttributeValidator.cpp index 8dabfc413..ee59e6e58 100644 --- a/src/Model/Model_AttributeValidator.cpp +++ b/src/Model/Model_AttributeValidator.cpp @@ -136,6 +136,9 @@ bool Model_AttributeValidator::isValid(const AttributePtr& theAttribute, if (aRefRes == aReferencedResults.end()) { aRefd = aReferencedFeature; aCheckFeature = false; + if (!aReferencedFeature->results().empty() && + aReferencedFeature->firstResult()->groupName() != ModelAPI_ResultBody::group()) + break; } else { aRefd = *aRefRes; if (aRefd->groupName() != ModelAPI_ResultBody::group())