From f131b9c7a82d93d7bef4dbed1ddd4afd4b61daec Mon Sep 17 00:00:00 2001 From: mpv Date: Fri, 29 Apr 2016 17:56:37 +0300 Subject: [PATCH] Fix for the issue #1432 --- src/Model/Model_Document.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) 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(); -- 2.39.2