From: mpv Date: Fri, 29 Apr 2016 14:56:37 +0000 (+0300) Subject: Fix for the issue #1432 X-Git-Tag: V_2.3.0~54 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f131b9c7a82d93d7bef4dbed1ddd4afd4b61daec;p=modules%2Fshaper.git Fix for the issue #1432 --- diff --git a/src/Model/Model_Document.cpp b/src/Model/Model_Document.cpp index baf6fe686..b0960472f 100755 --- a/src/Model/Model_Document.cpp +++ b/src/Model/Model_Document.cpp @@ -1299,6 +1299,15 @@ std::shared_ptr Model_Document::producedByFeature( if (aShape.IsNull()) return FeaturePtr(); + // for comsolids and compounds all the naming is located in the main object, so, try to use + // it first + ResultCompSolidPtr aMain = ModelAPI_Tools::compSolidOwner(theResult); + if (aMain.get()) { + FeaturePtr aMainRes = producedByFeature(aMain, theShape); + if (aMainRes) + return aMainRes; + } + std::shared_ptr aBodyData = std::dynamic_pointer_cast(theResult->data()); if (!aBodyData.get() || !aBodyData->isValid()) return FeaturePtr();