]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Added the geometrical naming flag. Modification of tests because of Recover feature...
authormpv <mpv@opencascade.com>
Fri, 2 Nov 2018 11:29:04 +0000 (14:29 +0300)
committermpv <mpv@opencascade.com>
Mon, 19 Nov 2018 08:45:52 +0000 (11:45 +0300)
src/FeaturesPlugin/Test/Test2240.py
src/FeaturesPlugin/Test/Test2394.py
src/FeaturesPlugin/Test/Test2419_2.py
src/FeaturesPlugin/Test/Test2419_3.py
src/Selector/Selector_Selector.cpp
src/Selector/Selector_Selector.h

index d6997510ea41e6dce72683e28c68cddbe0849345..a0b739e7e73b58e81da5f692be6e0785aaa56524 100644 (file)
@@ -144,7 +144,7 @@ Recover_2 = model.addRecover(Part_1_doc, LinearCopy_1, [Face_5.result()])
 Translation_2 = model.addTranslation(Part_1_doc, [model.selection("FACE", "Recover_2_1")], model.selection("VERTEX", "Sketch_3/SketchLine_11_EndVertex"), model.selection("VERTEX", "Sketch_1/SketchLine_3_EndVertex"))
 LinearCopy_3 = model.addMultiTranslation(Part_1_doc, [model.selection("FACE", "Translation_2_1")], model.selection("EDGE", "PartSet/OX"), "length_assemblage", 4)
 Recover_3 = model.addRecover(Part_1_doc, LinearCopy_1, [Face_5.result()])
-Translation_3 = model.addTranslation(Part_1_doc, [model.selection("FACE", "Recover_3_1")], model.selection("VERTEX", "Sketch_1/SketchLine_7_EndVertex"), model.selection("VERTEX", "[LinearCopy_3_1_1/ME:Translated_Edge&Recover_2_1/Shape_4][LinearCopy_3_1_1/ME:Translated_Edge&Recover_2_1/Shape_1]"))
+Translation_3 = model.addTranslation(Part_1_doc, [model.selection("FACE", "Recover_3_1")], model.selection("VERTEX", "Sketch_1/SketchLine_7_EndVertex"), model.selection("VERTEX", "[LinearCopy_3_1_1/ME:Translated_Edge&Face_5_1/Edge_1]e[LinearCopy_3_1_1/ME:Translated_Edge&Face_5_1/Edge_4]e"))
 LinearCopy_4 = model.addMultiTranslation(Part_1_doc, [model.selection("FACE", "Translation_3_1")], model.selection("EDGE", "PartSet/OX"), "length_assemblage", 3)
 Recover_4 = model.addRecover(Part_1_doc, LinearCopy_1, [Face_5.result()])
 Translation_4 = model.addTranslation(Part_1_doc, [model.selection("FACE", "Recover_4_1")], model.selection("VERTEX", "Sketch_1/SketchLine_7_EndVertex"), model.selection("VERTEX", "Sketch_1/SketchLine_1_StartVertex"))
index 47e885512a10af1ec0fd5b1601e61055627111a7..cc0cde10622639ccd51a9ce8bafd02633a814a12 100644 (file)
@@ -164,10 +164,10 @@ Plane_10 = model.addPlane(Part_1_doc, model.selection("VERTEX", "[Extrusion_2_1_
 Plane_11 = model.addPlane(Part_1_doc, model.selection("VERTEX", "[Extrusion_2_1_2/Generated_Face&Sketch_3/SketchCircle_1_2&weak_name_1][Extrusion_2_1_2/Generated_Face&Sketch_3/SketchLine_17][Extrusion_2_1_2/To_Face]"), model.selection("VERTEX", "[Extrusion_2_1_2/Generated_Face&Sketch_3/SketchLine_17][Extrusion_2_1_2/Generated_Face&Sketch_3/SketchLine_10][Extrusion_2_1_2/To_Face]"), model.selection("VERTEX", "[Extrusion_2_1_2/Generated_Face&Sketch_3/SketchCircle_1_2&weak_name_1][Extrusion_2_1_2/Generated_Face&Sketch_3/SketchLine_17][Extrusion_2_1_2/From_Face]"))
 Plane_12 = model.addPlane(Part_1_doc, model.selection("VERTEX", "[Extrusion_2_1_3/Generated_Face&Sketch_3/SketchLine_15][Extrusion_2_1_3/Generated_Face&Sketch_3/SketchLine_13][Extrusion_2_1_3/To_Face]"), model.selection("VERTEX", "[Extrusion_2_1_3/Generated_Face&Sketch_3/SketchCircle_1_2][Extrusion_2_1_3/Generated_Face&Sketch_3/SketchLine_15][Extrusion_2_1_3/To_Face]"), model.selection("VERTEX", "[Extrusion_2_1_3/Generated_Face&Sketch_3/SketchCircle_1_2][Extrusion_2_1_3/Generated_Face&Sketch_3/SketchLine_15][Extrusion_2_1_3/From_Face]"))
 Recover_1 = model.addRecover(Part_1_doc, Cut_1, [Extrusion_3.result()])
-Plane_13 = model.addPlane(Part_1_doc, model.selection("FACE", "Recover_1_1/Shape_4"), model.selection("EDGE", "[Recover_1_1/Shape_4][Recover_1_1/Shape_6]"), "90+45")
-Plane_14 = model.addPlane(Part_1_doc, model.selection("FACE", "Recover_1_1/Shape_1"), model.selection("EDGE", "[Recover_1_1/Shape_1][Recover_1_1/Shape_6]"), "90+45")
-Plane_15 = model.addPlane(Part_1_doc, model.selection("FACE", "Recover_1_1/Shape_2"), model.selection("EDGE", "[Recover_1_1/Shape_2][Recover_1_1/Shape_6]"), "90+45")
-Plane_16 = model.addPlane(Part_1_doc, model.selection("FACE", "Recover_1_1/Shape_6"), model.selection("EDGE", "[Recover_1_1/Shape_3][Recover_1_1/Shape_6]"), 45)
+Plane_13 = model.addPlane(Part_1_doc, model.selection("FACE", "Recover_1_1/Modified_Face&Sketch_3/SketchLine_10"), model.selection("EDGE", "[Recover_1_1/Modified_Face&Sketch_3/SketchLine_10][Recover_1_1/Modified_Face&Extrusion_3_1/To_Face]"), "90+45")
+Plane_14 = model.addPlane(Part_1_doc, model.selection("FACE", "Recover_1_1/Modified_Face&Sketch_3/SketchLine_13"), model.selection("EDGE", "[Recover_1_1/Modified_Face&Sketch_3/SketchLine_13][Recover_1_1/Modified_Face&Extrusion_3_1/To_Face]"), "90+45")
+Plane_15 = model.addPlane(Part_1_doc, model.selection("FACE", "Recover_1_1/Modified_Face&Sketch_3/SketchLine_12"), model.selection("EDGE", "[Recover_1_1/Modified_Face&Sketch_3/SketchLine_12][Recover_1_1/Modified_Face&Extrusion_3_1/To_Face]"), "90+45")
+Plane_16 = model.addPlane(Part_1_doc, model.selection("FACE", "Recover_1_1/Modified_Face&Extrusion_3_1/To_Face"), model.selection("EDGE", "[Recover_1_1/Modified_Face&Sketch_3/SketchLine_11][Recover_1_1/Modified_Face&Extrusion_3_1/To_Face]"), 45)
 Fill_5_objects_2 = [model.selection("FACE", "Plane_6"), model.selection("FACE", "Plane_7"), model.selection("FACE", "Plane_8"), model.selection("FACE", "Plane_9"), model.selection("FACE", "Plane_10"), model.selection("FACE", "Plane_11"), model.selection("FACE", "Plane_12"), model.selection("FACE", "Plane_13")]
 Fill_5 = model.addFill(Part_1_doc, [model.selection("SOLID", "demi-sphere")], Fill_5_objects_2)
 Fill_5.result().subResult(0).setName("Fill_5_1_1")
@@ -297,4 +297,5 @@ model.testResultsVolumes(Partition_1, [103221.354557478349306620657444])
 
 model.end()
 
+# too long
 #assert(model.checkPythonDump())
index e3d2c7cdddfb238e4a50dd05baed2fea1fd41eb3..a9cd57a06842e565f7f1a249f24c55b4dc1d19e4 100644 (file)
@@ -143,7 +143,7 @@ Recover_2 = model.addRecover(Part_1_doc, LinearCopy_1, [Face_5.result()])
 Translation_2 = model.addTranslation(Part_1_doc, [model.selection("FACE", "Recover_2_1")], model.selection("VERTEX", "Sketch_3/SketchLine_11_EndVertex"), model.selection("VERTEX", "Sketch_1/SketchLine_3_EndVertex"))
 LinearCopy_3 = model.addMultiTranslation(Part_1_doc, [model.selection("FACE", "Translation_2_1")], model.selection("EDGE", "PartSet/OX"), "length_assemblage", 4)
 Recover_3 = model.addRecover(Part_1_doc, LinearCopy_1, [Face_5.result()])
-Translation_3 = model.addTranslation(Part_1_doc, [model.selection("FACE", "Recover_3_1")], model.selection("VERTEX", "Sketch_1/SketchLine_7_EndVertex"), model.selection("VERTEX", "[LinearCopy_3_1_1/ME:Translated_Edge&Recover_2_1/Shape_4][LinearCopy_3_1_1/ME:Translated_Edge&Recover_2_1/Shape_1]"))
+Translation_3 = model.addTranslation(Part_1_doc, [model.selection("FACE", "Recover_3_1")], model.selection("VERTEX", "Sketch_1/SketchLine_7_EndVertex"), model.selection("VERTEX", "[LinearCopy_3_1_1/ME:Translated_Edge&Face_5_1/Edge_1]e[LinearCopy_3_1_1/ME:Translated_Edge&Face_5_1/Edge_4]e"))
 LinearCopy_4 = model.addMultiTranslation(Part_1_doc, [model.selection("FACE", "Translation_3_1")], model.selection("EDGE", "PartSet/OX"), "length_assemblage", 3)
 Recover_4 = model.addRecover(Part_1_doc, LinearCopy_1, [Face_5.result()])
 Translation_4 = model.addTranslation(Part_1_doc, [model.selection("FACE", "Recover_4_1")], model.selection("VERTEX", "Sketch_1/SketchLine_7_EndVertex"), model.selection("VERTEX", "Sketch_1/SketchLine_1_StartVertex"))
index b71a43b8b0b253e5624143c771c817b18128a506..cdb9855cfbb93acd1aacb6a21ff6a4fb0bc9c5b4 100644 (file)
@@ -143,7 +143,7 @@ Recover_2 = model.addRecover(Part_1_doc, LinearCopy_1, [Face_5.result()])
 Translation_2 = model.addTranslation(Part_1_doc, [model.selection("FACE", "Recover_2_1")], model.selection("VERTEX", "Sketch_3/SketchLine_11_EndVertex"), model.selection("VERTEX", "Sketch_1/SketchLine_3_EndVertex"))
 LinearCopy_3 = model.addMultiTranslation(Part_1_doc, [model.selection("FACE", "Translation_2_1")], model.selection("EDGE", "PartSet/OX"), "length_assemblage", 4)
 Recover_3 = model.addRecover(Part_1_doc, LinearCopy_1, [Face_5.result()])
-Translation_3 = model.addTranslation(Part_1_doc, [model.selection("FACE", "Recover_3_1")], model.selection("VERTEX", "Sketch_1/SketchLine_7_EndVertex"), model.selection("VERTEX", "[LinearCopy_3_1_1/ME:Translated_Edge&Recover_2_1/Shape_1][LinearCopy_3_1_1/ME:Translated_Edge&Recover_2_1/Shape_4]"))
+Translation_3 = model.addTranslation(Part_1_doc, [model.selection("FACE", "Recover_3_1")], model.selection("VERTEX", "Sketch_1/SketchLine_7_EndVertex"), model.selection("VERTEX", "[LinearCopy_3_1_1/ME:Translated_Edge&Face_5_1/Edge_1]e[LinearCopy_3_1_1/ME:Translated_Edge&Face_5_1/Edge_4]e"))
 LinearCopy_4 = model.addMultiTranslation(Part_1_doc, [model.selection("FACE", "Translation_3_1")], model.selection("EDGE", "PartSet/OX"), "length_assemblage", 3)
 Recover_4 = model.addRecover(Part_1_doc, LinearCopy_1, [Face_5.result()])
 Translation_4 = model.addTranslation(Part_1_doc, [model.selection("FACE", "Recover_4_1")], model.selection("VERTEX", "Sketch_1/SketchLine_7_EndVertex"), model.selection("VERTEX", "Sketch_1/SketchLine_1_StartVertex"))
index 752b9b97a464b547b0fdbe33e1a012092ee69a67..e83a90b530061f9a30cc2d4dc5fdac2d8e8dc7be 100644 (file)
@@ -41,6 +41,7 @@
 #include <TDataStd_ReferenceArray.hxx>
 #include <TDataStd_IntegerArray.hxx>
 #include <TDataStd_Name.hxx>
+#include <TDataStd_UAttribute.hxx>
 
 #include <list>
 
@@ -55,6 +56,14 @@ static const Standard_GUID kBASE_ARRAY("7c515b1a-9549-493d-9946-a4933a22f45f");
 static const Standard_GUID kLEVELS_ARRAY("ee4c4b45-e859-4e86-aa4f-6eac68e0ca1f");
 // weak index (integer) of the sub-shape
 static const Standard_GUID kWEAK_INDEX("e9373a61-cabc-4ee8-aabf-aea47c62ed87");
+// geometrical naming indicator
+static const Standard_GUID kGEOMETRICAL_NAMING("a5322d02-50fb-43ed-9255-75c7b93f6657");
+
+// string identifier of the weak name in modification or intersection types of algorithm
+static const std::string kWEAK_NAME_IDENTIFIER = "weak_name_";
+// string identifier of the pure weak name algorithm
+static const std::string kPUREWEAK_NAME_IDENTIFIER = "_weak_name_";
+
 
 Selector_Selector::Selector_Selector(TDF_Label theLab) : myLab(theLab)
 {
@@ -264,10 +273,11 @@ static const TopoDS_Shape findNeighbor(const TopoDS_Shape theContext,
 }
 
 bool Selector_Selector::select(const TopoDS_Shape theContext, const TopoDS_Shape theValue,
-  const bool theUseNeighbors, const bool theUseIntersections)
+  const bool theGeometricalNaming, const bool theUseNeighbors, const bool theUseIntersections)
 {
   if (theValue.IsNull() || theContext.IsNull())
     return false;
+  myGeometricalNaming = theGeometricalNaming;
   // check the value shape can be named as it is, or it is needed to construct it from the
   // higher level shapes (like a box vertex by faces that form this vertex)
   bool aIsFound = TNaming_Tool::HasLabel(myLab, theValue);
@@ -309,8 +319,8 @@ bool Selector_Selector::select(const TopoDS_Shape theContext, const TopoDS_Shape
         aSelectionType == TopAbs_SHELL || aSelectionType == TopAbs_WIRE)
     { // iterate all sub-shapes and select them on sublabels
       for(TopoDS_Iterator aSubIter(theValue); aSubIter.More(); aSubIter.Next()) {
-        if (!selectBySubSelector(
-            theContext, aSubIter.Value(), theUseNeighbors, theUseIntersections)) {
+        if (!selectBySubSelector(theContext, aSubIter.Value(),
+            theGeometricalNaming, theUseNeighbors, theUseIntersections)) {
           return false; // if some selector is failed, everything is failed
         }
       }
@@ -353,7 +363,8 @@ bool Selector_Selector::select(const TopoDS_Shape theContext, const TopoDS_Shape
         mySubSelList.clear();
         TopoDS_ListOfShape::Iterator anInt(anIntList);
         for (; anInt.More(); anInt.Next()) {
-          if (!selectBySubSelector(theContext, anInt.Value(), theUseNeighbors, false)) {
+          if (!selectBySubSelector(theContext, anInt.Value(),
+              theGeometricalNaming, theUseNeighbors, false)) {
             break; // if some selector is failed, stop and search another solution
           }
         }
@@ -386,7 +397,8 @@ bool Selector_Selector::select(const TopoDS_Shape theContext, const TopoDS_Shape
           // check which can be named correctly, without "by neighbors" type
           Selector_Selector aSelector(myLab.FindChild(1));
           aSelector.setBaseDocument(myBaseDocumentLab);
-          if (aSelector.select(theContext, aNewNBShape, false, false)) { // add to list of good NBs
+          if (aSelector.select(theContext, aNewNBShape, theGeometricalNaming, false, false)) {
+            // add to list of good NBs
             aNBs.push_back(std::pair<TopoDS_Shape, int>(aNewNBShape, aLevel));
           }
         }
@@ -395,7 +407,8 @@ bool Selector_Selector::select(const TopoDS_Shape theContext, const TopoDS_Shape
       if (!aResult.IsNull() && aResult.IsSame(theValue)) {
         std::list<std::pair<TopoDS_Shape, int> >::iterator aNBIter = aNBs.begin();
         for(; aNBIter != aNBs.end(); aNBIter++) {
-          if (!selectBySubSelector(theContext, aNBIter->first, false, false)) {
+          if (!selectBySubSelector(theContext, aNBIter->first,
+              theGeometricalNaming, false, false)) {
             return false; // something is wrong because before this selection was ok
           }
           myNBLevel.push_back(aNBIter->second);
@@ -415,8 +428,8 @@ bool Selector_Selector::select(const TopoDS_Shape theContext, const TopoDS_Shape
         mySubSelList.clear();
         TopoDS_ListOfShape::Iterator anInt(aLastIntersectors);
         for (; anInt.More(); anInt.Next()) {
-          if (!selectBySubSelector(
-              theContext, anInt.Value(), theUseNeighbors, theUseIntersections)) {
+          if (!selectBySubSelector(theContext, anInt.Value(),
+              theGeometricalNaming, theUseNeighbors, theUseIntersections)) {
             break; // if some selector is failed, stop and search another solution
           }
         }
@@ -545,7 +558,8 @@ bool Selector_Selector::select(const TopoDS_Shape theContext, const TopoDS_Shape
               Selector_Selector aSelector(myLab.FindChild(1));
               if (!myBaseDocumentLab.IsNull())
                 aSelector.setBaseDocument(myBaseDocumentLab);
-              if (aSelector.select(theContext, aNewNBShape, false)) {// add to list of good NBs
+              if (aSelector.select(theContext, aNewNBShape, theGeometricalNaming, false)) {
+                // add to list of good NBs
                 aNBs.push_back(std::pair<TopoDS_Shape, int>(aNewNBShape, aLevel));
               }
             }
@@ -554,8 +568,8 @@ bool Selector_Selector::select(const TopoDS_Shape theContext, const TopoDS_Shape
           if (!aResult.IsNull() && aResult.IsSame(theValue)) {
             std::list<std::pair<TopoDS_Shape, int> >::iterator aNBIter = aNBs.begin();
             for(; aNBIter != aNBs.end(); aNBIter++) {
-              if (!selectBySubSelector(
-                  theContext, aNBIter->first, theUseNeighbors, theUseIntersections)) {
+              if (!selectBySubSelector(theContext, aNBIter->first,
+                  theGeometricalNaming, theUseNeighbors, theUseIntersections)) {
                 return false; // something is wrong because before this selection was ok
               }
               myNBLevel.push_back(aNBIter->second);
@@ -602,6 +616,8 @@ void Selector_Selector::store()
 {
   myLab.ForgetAllAttributes(true); // remove old naming data
   TDataStd_Integer::Set(myLab, kSEL_TYPE, (int)myType);
+  if (myGeometricalNaming)
+    TDataStd_UAttribute::Set(myLab, kGEOMETRICAL_NAMING);
   switch(myType) {
   case SELTYPE_CONTAINER:
   case SELTYPE_INTERSECT: {
@@ -673,6 +689,7 @@ bool Selector_Selector::restore()
   Handle(TDataStd_Integer) aTypeAttr;
   if (!myLab.FindAttribute(kSEL_TYPE, aTypeAttr))
     return false;
+  myGeometricalNaming = myLab.IsAttribute(kGEOMETRICAL_NAMING);
   myType = Selector_Type(aTypeAttr->Get());
   switch(myType) {
   case SELTYPE_CONTAINER:
@@ -960,9 +977,6 @@ TopoDS_Shape Selector_Selector::value()
   return TopoDS_Shape(); // empty, error shape
 }
 
-static const std::string kWEAK_NAME_IDENTIFIER = "weak_name_";
-static const std::string kPUREWEAK_NAME_IDENTIFIER = "_weak_name_";
-
 std::string Selector_Selector::name(Selector_NameGenerator* theNameGenerator) {
   switch(myType) {
   case SELTYPE_CONTAINER:
@@ -1060,8 +1074,9 @@ std::string Selector_Selector::name(Selector_NameGenerator* theNameGenerator) {
 
 TDF_Label Selector_Selector::restoreByName(
   std::string theName, const TopAbs_ShapeEnum theShapeType,
-  Selector_NameGenerator* theNameGenerator)
+  Selector_NameGenerator* theNameGenerator, const bool theGeometricalNaming)
 {
+  myGeometricalNaming = theGeometricalNaming;
   if (theName[0] == '[') { // intersection or container
     switch(theShapeType) {
     case TopAbs_COMPOUND:
@@ -1108,8 +1123,8 @@ TDF_Label Selector_Selector::restoreByName(
         }
         mySubSelList.push_back(Selector_Selector(myLab.FindChild(int(mySubSelList.size()) + 1)));
         mySubSelList.back().setBaseDocument(myBaseDocumentLab);
-        TDF_Label aSubContext =
-          mySubSelList.back().restoreByName(aSubStr, aSubShapeType, theNameGenerator);
+        TDF_Label aSubContext = mySubSelList.back().restoreByName(
+          aSubStr, aSubShapeType, theNameGenerator, theGeometricalNaming);
         if (aSubContext.IsNull())
           return aSubContext; // invalid sub-selection parsing
         if (!aContext.IsNull() && !aContext.IsEqual(aSubContext)) {
@@ -1132,8 +1147,8 @@ TDF_Label Selector_Selector::restoreByName(
         std::string aSubStr = theName.substr(aStart + 1, anEndPos - aStart - 1);
         mySubSelList.push_back(Selector_Selector(myLab.FindChild(int(mySubSelList.size()) + 1)));
         mySubSelList.back().setBaseDocument(myBaseDocumentLab);
-        TDF_Label aSubContext =
-          mySubSelList.back().restoreByName(aSubStr, theShapeType, theNameGenerator);
+        TDF_Label aSubContext = mySubSelList.back().restoreByName(
+          aSubStr, theShapeType, theNameGenerator, theGeometricalNaming);
         if (aSubContext.IsNull())
           return aSubContext; // invalid sub-selection parsing
         if (!aContext.IsNull() && !aContext.IsEqual(aSubContext)) {
@@ -1214,14 +1229,15 @@ TDF_Label Selector_Selector::restoreByName(
   return TDF_Label();
 }
 
-bool Selector_Selector::selectBySubSelector(
-  const TopoDS_Shape theContext, const TopoDS_Shape theValue,
+bool Selector_Selector::selectBySubSelector(const TopoDS_Shape theContext,
+  const TopoDS_Shape theValue, const bool theGeometricalNaming,
   const bool theUseNeighbors, const bool theUseIntersections)
 {
   mySubSelList.push_back(Selector_Selector(myLab.FindChild(int(mySubSelList.size()) + 1)));
   if (!myBaseDocumentLab.IsNull())
     mySubSelList.back().setBaseDocument(myBaseDocumentLab);
-  if (!mySubSelList.back().select(theContext, theValue, theUseNeighbors, theUseIntersections)) {
+  if (!mySubSelList.back().select(theContext, theValue,
+      theGeometricalNaming, theUseNeighbors, theUseIntersections)) {
     mySubSelList.clear(); // if one of the selector is failed, all become invalid
     return false;
   }
index 92f513a3219104198827b9831d91ab9d187af87c..fa069c4aa09d31b5e72e8f898226b3aff2b46b2d 100644 (file)
@@ -61,48 +61,57 @@ class Selector_Selector
 
   TDF_Label myBaseDocumentLab; ///< an access-label to the document that may contain initial shapes
 
- public:
+  bool myGeometricalNaming; ///< flag that indicates that geometrical naming selection is enabled
+
+public:
   /// Initializes selector on the label
-   SELECTOR_EXPORT Selector_Selector(TDF_Label theLab);
+  SELECTOR_EXPORT Selector_Selector(TDF_Label theLab);
   /// Returns label of this selector
-   SELECTOR_EXPORT TDF_Label label();
+  SELECTOR_EXPORT TDF_Label label();
 
-   /// Sets the base document access label.
-   SELECTOR_EXPORT void setBaseDocument(const TDF_Label theAccess);
+  /// Sets the base document access label.
+  SELECTOR_EXPORT void setBaseDocument(const TDF_Label theAccess);
 
   /// Initializes the selector structure on the label.
   /// Stores the name data to restore after modification.
-   SELECTOR_EXPORT bool select(const TopoDS_Shape theContext, const TopoDS_Shape theValue,
-     const bool theUseNeighbors = true, const bool theUseIntersections = true);
+  /// \param theContext whole shape that contains the selected sub-shape
+  /// \param theValue selected subshape
+  /// \param theGeometricalNaming treats selection with equal surfaces as one
+  /// \param theUseNeighbors enables searching algorithm by neighbors
+  /// \param theUseIntersections enables searching algorithm by intersection of higher level shapes
+  SELECTOR_EXPORT bool select(const TopoDS_Shape theContext, const TopoDS_Shape theValue,
+    const bool theGeometricalNaming = false,
+    const bool theUseNeighbors = true, const bool theUseIntersections = true);
 
   /// Stores the name to the label and sub-labels tree
-   SELECTOR_EXPORT void store();
+  SELECTOR_EXPORT void store();
 
   /// Restores the selected shape by the topological naming kept in the data structure
   /// Returns true if it can restore structure correctly
-   SELECTOR_EXPORT bool restore();
+  SELECTOR_EXPORT bool restore();
 
-   /// Restores the selected shape by the topological name string.
-   /// Returns not empty label of the context.
-   SELECTOR_EXPORT TDF_Label restoreByName(
-     std::string theName, const TopAbs_ShapeEnum theShapeType,
-     Selector_NameGenerator* theNameGenerator);
+  /// Restores the selected shape by the topological name string.
+  /// Returns not empty label of the context.
+  SELECTOR_EXPORT TDF_Label restoreByName(
+    std::string theName, const TopAbs_ShapeEnum theShapeType,
+    Selector_NameGenerator* theNameGenerator, const bool theGeometricalNaming = false);
 
   /// Updates the current shape by the stored topological name
-   SELECTOR_EXPORT bool solve(const TopoDS_Shape& theContext);
+  SELECTOR_EXPORT bool solve(const TopoDS_Shape& theContext);
 
-   /// Returns the current sub-shape value (null if can not resolve)
-   SELECTOR_EXPORT TopoDS_Shape value();
+  /// Returns the current sub-shape value (null if can not resolve)
+  SELECTOR_EXPORT TopoDS_Shape value();
 
-   /// Returns the naming name of the selection
-   SELECTOR_EXPORT std::string name(Selector_NameGenerator* theNameGenerator);
+  /// Returns the naming name of the selection
+  SELECTOR_EXPORT std::string name(Selector_NameGenerator* theNameGenerator);
 
 private:
 
   /// Create and keep in the list the sub-selector that select the given value.
   /// Returns true if selection is correct.
   bool selectBySubSelector(const TopoDS_Shape theContext, const TopoDS_Shape theValue,
-    const bool theUseNeighbors = true, const bool theUseIntersections = true);
+    const bool theGeometricalNaming = false, const bool theUseNeighbors = true,
+    const bool theUseIntersections = true);
   /// Searches the final shapes presented in all results from bases basing on modification fields
   void findModificationResult(TopoDS_ListOfShape& theCommon);
 };