From f2709e635f5490138f93c8ed401de6686bcc685f Mon Sep 17 00:00:00 2001 From: nds Date: Fri, 17 Jun 2016 11:21:56 +0300 Subject: [PATCH] Issue #1550 Correction for external objects, case: Create extrusion(on circle), start Sketch, select top face of the extrusion, create Projection, Start Equal, select circle of Projection. Result: field is filled by the projection though a projection is not shown in the viewer. --- src/PartSet/PartSet_ExternalObjectsMgr.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/PartSet/PartSet_ExternalObjectsMgr.cpp b/src/PartSet/PartSet_ExternalObjectsMgr.cpp index 98bcf3d1c..c636f5b3b 100755 --- a/src/PartSet/PartSet_ExternalObjectsMgr.cpp +++ b/src/PartSet/PartSet_ExternalObjectsMgr.cpp @@ -47,6 +47,16 @@ ObjectPtr PartSet_ExternalObjectsMgr::externalObject(const ObjectPtr& theSelecte { ObjectPtr aSelectedObject = PartSet_Tools::findFixedObjectByExternal( theShape->impl(), theSelectedObject, theSketch); + FeaturePtr aFeature = ModelAPI_Feature::feature(aSelectedObject); + if (aFeature.get()) { + std::shared_ptr aSketchFeature = + std::dynamic_pointer_cast(aFeature); + /// some sketch entities should be never shown, e.g. projection feature + /// such external features should not be used in selection + if (aSketchFeature.get() && !aSketchFeature->canBeDisplayed()) + return ObjectPtr(); + } + if (!aSelectedObject.get()) { // Processing of external (non-sketch) object aSelectedObject = PartSet_Tools::createFixedObjectByExternal(theShape->impl(), -- 2.39.2