From 34d5d9f54f53614ca4e5cf233025bb378b1d65b6 Mon Sep 17 00:00:00 2001 From: mpv Date: Thu, 18 Oct 2018 17:30:15 +0300 Subject: [PATCH] Support of all types of selection in python names import --- src/Selector/Selector_Selector.cpp | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/src/Selector/Selector_Selector.cpp b/src/Selector/Selector_Selector.cpp index c1c86cda3..fa1f562b1 100644 --- a/src/Selector/Selector_Selector.cpp +++ b/src/Selector/Selector_Selector.cpp @@ -729,6 +729,8 @@ TopoDS_Shape Selector_Selector::value() return TopoDS_Shape(); // empty, error shape } +static const std::string kWEAK_NAME_IDENTIFIER = "weak_name_"; + std::string Selector_Selector::name(Selector_NameGenerator* theNameGenerator) { switch(myType) { case SELTYPE_CONTAINER: @@ -751,7 +753,7 @@ std::string Selector_Selector::name(Selector_NameGenerator* theNameGenerator) { std::string(TCollection_AsciiString(aName->Get()).ToCString()); } case SELTYPE_MODIFICATION: { - // final&base1&base2 + // final&base1&base2 +optionally: [weak_name_1] std::string aResult; Handle(TDataStd_Name) aName; if (!myFinal.FindAttribute(TDataStd_Name::GetID(), aName)) @@ -767,7 +769,7 @@ std::string Selector_Selector::name(Selector_NameGenerator* theNameGenerator) { std::string(TCollection_AsciiString(aName->Get()).ToCString()); if (myWeakIndex != -1) { std::ostringstream aWeakStr; - aWeakStr<<"&weak_name_"<restoreContext(aSubStr, aSubContext, aValue)) return TDF_Label(); // can not restore -- 2.39.2