From: mpv Date: Thu, 18 Oct 2018 14:30:15 +0000 (+0300) Subject: Support of all types of selection in python names import X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=34d5d9f54f53614ca4e5cf233025bb378b1d65b6;p=modules%2Fshaper.git Support of all types of selection in python names import --- 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