Salome HOME
For the issue #2903 : correctly process also the references to construction - features.
authormpv <mpv@opencascade.com>
Wed, 10 Apr 2019 06:02:29 +0000 (09:02 +0300)
committermpv <mpv@opencascade.com>
Wed, 10 Apr 2019 06:02:29 +0000 (09:02 +0300)
src/FeaturesPlugin/Test/TestRemoveSubShapes3.py
src/Model/Model_AttributeValidator.cpp

index 87dc9185becde864a223c33ed26fca695e61c493..c159dbe564a80eb0ae2587207e019f0174e5bf36 100644 (file)
@@ -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")])
 
index 8dabfc41315aa729f19087f8bf1c121c94ccf4a1..ee59e6e583de1ecd7cff0bbb0454e2bbfbab9985 100644 (file)
@@ -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())