From c57e58a00e7e9dd22c8872eb652c624f9176f119 Mon Sep 17 00:00:00 2001 From: mpv Date: Wed, 10 Apr 2019 09:02:29 +0300 Subject: [PATCH] For the issue #2903 : correctly process also the references to construction - features. --- src/FeaturesPlugin/Test/TestRemoveSubShapes3.py | 3 ++- src/Model/Model_AttributeValidator.cpp | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) 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()) -- 2.39.2