From: nds Date: Fri, 17 Jun 2016 08:21:56 +0000 (+0300) Subject: Issue #1550 Correction for external objects, case: Create extrusion(on circle), start... X-Git-Tag: V_2.4.0~92 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f2709e635f5490138f93c8ed401de6686bcc685f;p=modules%2Fshaper.git 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. --- 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(),