]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Debug of Selector and correction of unit-tests
authormpv <mpv@opencascade.com>
Mon, 19 Nov 2018 11:53:32 +0000 (14:53 +0300)
committermpv <mpv@opencascade.com>
Mon, 19 Nov 2018 11:53:55 +0000 (14:53 +0300)
12 files changed:
src/FeaturesPlugin/Test/Test2197_3.py
src/FeaturesPlugin/Test/Test2197_4.py
src/FeaturesPlugin/Test/Test2375.py
src/ModelAPI/Test/Test2391.py
src/ModelAPI/Test/TestCustomName_MultiTranslation.py
src/ModelAPI/Test/TestCustomName_Translation.py
src/Selector/Selector_Algo.cpp
src/Selector/Selector_Algo.h
src/Selector/Selector_FilterByNeighbors.cpp
src/Selector/Selector_Intersect.cpp
src/Selector/Selector_Selector.cpp
test.models/case24.py

index 0320902f0e4c78eb861fa33f3ecca887d4e1c2a3..cf01ec2dc9917102fae3e346eaaf46baf9bad67f 100644 (file)
@@ -37,7 +37,7 @@ SketchConstraintCoincidence_3 = Sketch_1.setCoincident(SketchLine_3.endPoint(),
 SketchConstraintCoincidence_4 = Sketch_1.setCoincident(SketchLine_1.startPoint(), SketchLine_4.endPoint())
 model.do()
 Revolution_1 = model.addRevolution(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_1r-SketchLine_2f-SketchLine_3f-SketchLine_4f")], model.selection("EDGE", "Sketch_1/SketchLine_4"), 360, 0)
-Group_1_objects = [model.selection("EDGE", "[Revolution_1_1/Generated_Face&Sketch_1/SketchLine_1][Revolution_1_1/Generated_Face&Sketch_1/SketchLine_2]"), model.selection("EDGE", "[Revolution_1_1/Generated_Face&Sketch_1/SketchLine_1][weak_name_3]"), model.selection("EDGE", "[Revolution_1_1/Generated_Face&Sketch_1/SketchLine_2][Revolution_1_1/Generated_Face&Sketch_1/SketchLine_3]"), model.selection("EDGE", "[Revolution_1_1/Generated_Face&Sketch_1/SketchLine_2][weak_name_3]"), model.selection("EDGE", "[Revolution_1_1/Generated_Face&Sketch_1/SketchLine_3][weak_name_3]")]
+Group_1_objects = [model.selection("EDGE", "[Revolution_1_1/Generated_Face&Sketch_1/SketchLine_1][Revolution_1_1/Generated_Face&Sketch_1/SketchLine_2]"), model.selection("EDGE", "[Revolution_1_1/Generated_Face&Sketch_1/SketchLine_1][weak_name_3]"), model.selection("EDGE", "[Revolution_1_1/Generated_Face&Sketch_1/SketchLine_2][Revolution_1_1/Generated_Face&Sketch_1/SketchLine_3]"), model.selection("EDGE", "([Revolution_1_1/Generated_Face&Sketch_1/SketchLine_1][Revolution_1_1/Generated_Face&Sketch_1/SketchLine_2])([Revolution_1_1/Generated_Face&Sketch_1/SketchLine_2][Revolution_1_1/Generated_Face&Sketch_1/SketchLine_3])"), model.selection("EDGE", "[Revolution_1_1/Generated_Face&Sketch_1/SketchLine_3][weak_name_3]")]
 Group_1 = model.addGroup(Part_1_doc, Group_1_objects)
 model.do()
 model.end()
index 967b9beefcc9525a4b50b7573581624207485e4a..cdcd04e6ee3b4ba6bb284dbc90f4acf48413671a 100644 (file)
@@ -52,7 +52,7 @@ SketchConstraintCoincidence_5 = Sketch_1.setCoincident(SketchLine_1.endPoint(),
 SketchConstraintCoincidence_5.setName("SketchConstraintCoincidence_7")
 model.do()
 Revolution_1 = model.addRevolution(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_1r-SketchLine_6r-SketchLine_5r-SketchLine_3f-SketchLine_4f")], model.selection("EDGE", "Sketch_1/SketchLine_4"), 360, 0)
-Group_1_objects = [model.selection("EDGE", "[Revolution_1_1/Generated_Face&Sketch_1/SketchLine_1][Revolution_1_1/Generated_Face&Sketch_1/SketchLine_6]"), model.selection("EDGE", "[Revolution_1_1/Generated_Face&Sketch_1/SketchLine_6][Revolution_1_1/Generated_Face&Sketch_1/SketchLine_5]"), model.selection("EDGE", "[Revolution_1_1/Generated_Face&Sketch_1/SketchLine_5][Revolution_1_1/Generated_Face&Sketch_1/SketchLine_3]"), model.selection("EDGE", "[Revolution_1_1/Generated_Face&Sketch_1/SketchLine_3][weak_name_3]"), model.selection("EDGE", "[Revolution_1_1/Generated_Face&Sketch_1/SketchLine_1][weak_name_3]"), model.selection("EDGE", "[Revolution_1_1/Generated_Face&Sketch_1/SketchLine_6][weak_name_3]"), model.selection("EDGE", "[Revolution_1_1/Generated_Face&Sketch_1/SketchLine_5][weak_name_3]")]
+Group_1_objects = [model.selection("EDGE", "[Revolution_1_1/Generated_Face&Sketch_1/SketchLine_1][Revolution_1_1/Generated_Face&Sketch_1/SketchLine_6]"), model.selection("EDGE", "[Revolution_1_1/Generated_Face&Sketch_1/SketchLine_6][Revolution_1_1/Generated_Face&Sketch_1/SketchLine_5]"), model.selection("EDGE", "[Revolution_1_1/Generated_Face&Sketch_1/SketchLine_5][Revolution_1_1/Generated_Face&Sketch_1/SketchLine_3]"), model.selection("EDGE", "[Revolution_1_1/Generated_Face&Sketch_1/SketchLine_3][weak_name_3]"), model.selection("EDGE", "[Revolution_1_1/Generated_Face&Sketch_1/SketchLine_1][weak_name_3]"), model.selection("EDGE", "([Revolution_1_1/Generated_Face&Sketch_1/SketchLine_1][Revolution_1_1/Generated_Face&Sketch_1/SketchLine_6])([Revolution_1_1/Generated_Face&Sketch_1/SketchLine_6][Revolution_1_1/Generated_Face&Sketch_1/SketchLine_5])"), model.selection("EDGE", "([Revolution_1_1/Generated_Face&Sketch_1/SketchLine_6][Revolution_1_1/Generated_Face&Sketch_1/SketchLine_5])([Revolution_1_1/Generated_Face&Sketch_1/SketchLine_5][Revolution_1_1/Generated_Face&Sketch_1/SketchLine_3])")]
 Group_1 = model.addGroup(Part_1_doc, Group_1_objects)
 model.do()
 model.end()
index 550886555d85d19cf7fab5df5996f21111e20a8e..b468d2fce692403538ba82a91f0b8db129fd76f0 100644 (file)
@@ -210,13 +210,8 @@ Revolution_2 = model.addRevolution(Part_1_doc, [model.selection("COMPOUND", "Ske
 Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_2/Face-SketchCircle_13_2f"), model.selection("FACE", "Sketch_2/Face-SketchCircle_14_2f")], model.selection(), model.selection("FACE", "Revolution_1_1/Generated_Face&Sketch_1/SketchLine_7"), 0, model.selection(), 0)
 Common_1 = model.addCommon(Part_1_doc, [model.selection("SOLID", "Extrusion_1_2"), model.selection("SOLID", "Extrusion_1_1")], [model.selection("SOLID", "Revolution_2_1")])
 Cut_1 = model.addCut(Part_1_doc, [model.selection("SOLID", "ExtrusionCut_3_1")], [model.selection("SOLID", "Common_1_1"), model.selection("SOLID", "Common_1_2")])
-Group_1_objects = [model.selection("VERTEX", "[Revolution_1_1/Generated_Face&Sketch_1/SketchLine_7][Revolution_1_1/Generated_Face&Sketch_1/SketchLine_5]"), model.selection("VERTEX", "[Revolution_1_1/Generated_Face&Sketch_1/SketchLine_5][ExtrusionCut_3_1/Modified_Face&Sketch_1/SketchLine_4]"), model.selection("VERTEX", "[ExtrusionCut_3_1/Modified_Face&Sketch_1/SketchLine_4][Revolution_1_1/Generated_Face&Sketch_1/SketchLine_3]"), model.selection("VERTEX", "[ExtrusionCut_3_1/Modified_Face&Sketch_1/SketchLine_4][ExtrusionCut_1_1/Generated_Face&Sketch_2/SketchCircle_4_2]"), model.selection("VERTEX", "[ExtrusionCut_3_1/Modified_Face&Sketch_1/SketchLine_4][ExtrusionCut_2_1/Modified_Face&Sketch_2/SketchCircle_5_2]"), model.selection("VERTEX", "[ExtrusionCut_3_1/Modified_Face&Sketch_1/SketchLine_4][ExtrusionCut_3_1/Generated_Face&Sketch_2/SketchCircle_15_2]"), model.selection("VERTEX", "[ExtrusionCut_3_1/Modified_Face&Sketch_1/SketchLine_4][ExtrusionCut_2_1/Modified_Face&Sketch_2/SketchCircle_9_2]"), model.selection("VERTEX", "[ExtrusionCut_3_1/Modified_Face&Sketch_1/SketchLine_4][ExtrusionCut_2_1/Modified_Face&Sketch_2/SketchCircle_10_2]"), model.selection("VERTEX", "[ExtrusionCut_3_1/Modified_Face&Sketch_1/SketchLine_4][ExtrusionCut_1_1/Generated_Face&Sketch_2/SketchCircle_3_2]"), model.selection("VERTEX", "[ExtrusionCut_3_1/Modified_Face&Sketch_1/SketchLine_4][ExtrusionCut_1_1/Generated_Face&Sketch_2/SketchCircle_16_2]"), model.selection("VERTEX", "[ExtrusionCut_3_1/Modified_Face&Sketch_1/SketchLine_4][ExtrusionCut_1_1/Generated_Face&Sketch_2/SketchCircle_17_2]"), model.selection("VERTEX", "[ExtrusionCut_3_1/Modified_Face&Sketch_1/SketchLine_4][ExtrusionCut_1_1/Generated_Face&Sketch_2/SketchCircle_2_2]"), model.selection("VERTEX", "[Revolution_1_1/Generated_Face&Sketch_1/SketchLine_3][Cut_1_1/Modified_Face&Sketch_1/SketchLine_1]"), model.selection("VERTEX", "[ExtrusionCut_2_1/Modified_Face&Sketch_2/SketchCircle_7_2][(ExtrusionCut_2_1/Modified_Face&Sketch_2/SketchCircle_7_2)(ExtrusionCut_2_1/Generated_Face&Sketch_2/SketchCircle_8_2)]"), model.selection("VERTEX", "[ExtrusionCut_1_1/Generated_Face&Sketch_2/SketchCircle_4_2][Cut_1_1/Modified_Face&Sketch_1/SketchLine_1]"), model.selection("VERTEX", "[ExtrusionCut_2_1/Modified_Face&Sketch_2/SketchCircle_5_2][(ExtrusionCut_2_1/Modified_Face&Sketch_2/SketchCircle_5_2)(ExtrusionCut_2_1/Generated_Face&Sketch_2/SketchCircle_6_2)]"), model.selection("VERTEX", "[ExtrusionCut_3_1/Generated_Face&Sketch_2/SketchCircle_15_2][Cut_1_1/Modified_Face&Sketch_1/SketchLine_1]"), model.selection("VERTEX", "[ExtrusionCut_2_1/Modified_Face&Sketch_2/SketchCircle_9_2][(ExtrusionCut_2_1/Modified_Face&Sketch_2/SketchCircle_9_2)(ExtrusionCut_2_1/Generated_Face&Sketch_2/SketchCircle_11_2)]"), model.selection("VERTEX", "[ExtrusionCut_2_1/Modified_Face&Sketch_2/SketchCircle_10_2][(ExtrusionCut_2_1/Modified_Face&Sketch_2/SketchCircle_10_2)(ExtrusionCut_2_1/Generated_Face&Sketch_2/SketchCircle_12_2)]"), model.selection("VERTEX", "[ExtrusionCut_1_1/Generated_Face&Sketch_2/SketchCircle_3_2][Cut_1_1/Modified_Face&Sketch_1/SketchLine_1]"), model.selection("VERTEX", "[ExtrusionCut_1_1/Generated_Face&Sketch_2/SketchCircle_16_2][Cut_1_1/Modified_Face&Sketch_1/SketchLine_1]"), model.selection("VERTEX", "[ExtrusionCut_1_1/Generated_Face&Sketch_2/SketchCircle_17_2][Cut_1_1/Modified_Face&Sketch_1/SketchLine_1]"), model.selection("VERTEX", "[ExtrusionCut_1_1/Generated_Face&Sketch_2/SketchCircle_2_2][Cut_1_1/Modified_Face&Sketch_1/SketchLine_1]"), model.selection("VERTEX", "[Cut_1_1/Modified_Face&Sketch_1/SketchLine_1][ExtrusionCut_2_1/Generated_Face&Sketch_2/SketchCircle_6_2]"), model.selection("VERTEX", "[Cut_1_1/Modified_Face&Sketch_1/SketchLine_1][ExtrusionCut_2_1/Generated_Face&Sketch_2/SketchCircle_11_2]"), model.selection("VERTEX", "[Cut_1_1/Modified_Face&Sketch_1/SketchLine_1][ExtrusionCut_2_1/Generated_Face&Sketch_2/SketchCircle_12_2]"), model.selection("VERTEX", "[Cut_1_1/Modified_Face&Sketch_1/SketchLine_1][Common_1_2/Modified_Face&Sketch_2/SketchCircle_13_2]"), model.selection("VERTEX", "[Cut_1_1/Modified_Face&Sketch_1/SketchLine_1][Common_1_1/Modified_Face&Sketch_2/SketchCircle_14_2]"), model.selection("VERTEX", "[Cut_1_1/Modified_Face&Sketch_1/SketchLine_1][ExtrusionCut_2_1/Generated_Face&Sketch_2/SketchCircle_8_2]"), model.selection("VERTEX", "[(ExtrusionCut_2_1/Modified_Face&Sketch_2/SketchCircle_7_2)(ExtrusionCut_2_1/Generated_Face&Sketch_2/SketchCircle_8_2)][ExtrusionCut_2_1/Generated_Face&Sketch_2/SketchCircle_8_2]"), model.selection("VERTEX", "[(ExtrusionCut_2_1/Modified_Face&Sketch_2/SketchCircle_5_2)(ExtrusionCut_2_1/Generated_Face&Sketch_2/SketchCircle_6_2)][ExtrusionCut_2_1/Generated_Face&Sketch_2/SketchCircle_6_2]"), model.selection("VERTEX", "[(ExtrusionCut_2_1/Modified_Face&Sketch_2/SketchCircle_9_2)(ExtrusionCut_2_1/Generated_Face&Sketch_2/SketchCircle_11_2)][ExtrusionCut_2_1/Generated_Face&Sketch_2/SketchCircle_11_2]"), model.selection("VERTEX", "[(ExtrusionCut_2_1/Modified_Face&Sketch_2/SketchCircle_10_2)(ExtrusionCut_2_1/Generated_Face&Sketch_2/SketchCircle_12_2)][ExtrusionCut_2_1/Generated_Face&Sketch_2/SketchCircle_12_2]"), model.selection("VERTEX", "Common_1_2/Generated_Vertex&Sketch_3/SketchLine_25"), model.selection("VERTEX", "Common_1_1/Generated_Vertex&Sketch_3/SketchLine_25")]
-Group_1 = model.addGroup(Part_1_doc, Group_1_objects)
-Group_2_objects = [model.selection("EDGE", "[ExtrusionCut_3_1/Modified_Face&Sketch_1/SketchLine_4][ExtrusionCut_2_1/Modified_Face&Sketch_2/SketchCircle_10_2]"), model.selection("EDGE", "[ExtrusionCut_2_1/Modified_Face&Sketch_2/SketchCircle_10_2][weak_name_3]"), model.selection("EDGE", "[Cut_1_1/Modified_Face&Sketch_1/SketchLine_1][ExtrusionCut_2_1/Generated_Face&Sketch_2/SketchCircle_11_2]"), model.selection("EDGE", "[ExtrusionCut_2_1/Modified_Face&Sketch_2/SketchCircle_10_2][(ExtrusionCut_2_1/Modified_Face&Sketch_2/SketchCircle_10_2)(ExtrusionCut_2_1/Generated_Face&Sketch_2/SketchCircle_12_2)]"), model.selection("EDGE", "[ExtrusionCut_2_1/Generated_Face&Sketch_2/SketchCircle_12_2][weak_name_3]"), model.selection("EDGE", "[ExtrusionCut_3_1/Modified_Face&Sketch_1/SketchLine_4][ExtrusionCut_1_1/Generated_Face&Sketch_2/SketchCircle_3_2]"), model.selection("EDGE", "[ExtrusionCut_1_1/Generated_Face&Sketch_2/SketchCircle_3_2][Cut_1_1/Modified_Face&Sketch_1/SketchLine_1]"), model.selection("EDGE", "Common_1_2/Generated_Edge&Sketch_3/SketchLine_25&Sketch_2/SketchCircle_13_2"), model.selection("EDGE", "[Cut_1_1/Modified_Face&Sketch_1/SketchLine_1][Common_1_2/Modified_Face&Sketch_2/SketchCircle_13_2]"), model.selection("EDGE", "(Common_1_2/Generated_Edge&Sketch_3/SketchLine_25&Sketch_2/SketchCircle_13_2)(Common_1_2/Generated_Edge&Sketch_3/SketchLine_25&Sketch_2/SketchCircle_13_2)"), model.selection("EDGE", "[ExtrusionCut_3_1/Modified_Face&Sketch_1/SketchLine_4][ExtrusionCut_1_1/Generated_Face&Sketch_2/SketchCircle_4_2]"), model.selection("EDGE", "[ExtrusionCut_1_1/Generated_Face&Sketch_2/SketchCircle_3_2][weak_name_3]"), model.selection("EDGE", "[ExtrusionCut_2_1/Modified_Face&Sketch_2/SketchCircle_9_2][weak_name_3]"), model.selection("EDGE", "[ExtrusionCut_3_1/Modified_Face&Sketch_1/SketchLine_4][ExtrusionCut_2_1/Modified_Face&Sketch_2/SketchCircle_9_2]"), model.selection("EDGE", "[ExtrusionCut_2_1/Modified_Face&Sketch_2/SketchCircle_9_2][(ExtrusionCut_2_1/Modified_Face&Sketch_2/SketchCircle_9_2)(ExtrusionCut_2_1/Generated_Face&Sketch_2/SketchCircle_11_2)]"), model.selection("EDGE", "[(ExtrusionCut_2_1/Modified_Face&Sketch_2/SketchCircle_9_2)(ExtrusionCut_2_1/Generated_Face&Sketch_2/SketchCircle_11_2)][ExtrusionCut_2_1/Generated_Face&Sketch_2/SketchCircle_11_2]"), model.selection("EDGE", "[Cut_1_1/Modified_Face&Sketch_1/SketchLine_1][ExtrusionCut_2_1/Generated_Face&Sketch_2/SketchCircle_11_2]"), model.selection("EDGE", "[ExtrusionCut_2_1/Generated_Face&Sketch_2/SketchCircle_11_2][weak_name_3]"), model.selection("EDGE", "[ExtrusionCut_3_1/Modified_Face&Sketch_1/SketchLine_4][ExtrusionCut_3_1/Generated_Face&Sketch_2/SketchCircle_15_2]"), model.selection("EDGE", "(Common_1_1/Generated_Edge&Sketch_3/SketchLine_25&Sketch_2/SketchCircle_14_2)(Common_1_1/Generated_Edge&Sketch_3/SketchLine_25&Sketch_2/SketchCircle_14_2)"), model.selection("EDGE", "Common_1_1/Generated_Edge&Sketch_3/SketchLine_25&Sketch_2/SketchCircle_14_2"), model.selection("EDGE", "[Cut_1_1/Modified_Face&Sketch_1/SketchLine_1][ExtrusionCut_2_1/Generated_Face&Sketch_2/SketchCircle_11_2]"), model.selection("EDGE", "[ExtrusionCut_3_1/Modified_Face&Sketch_1/SketchLine_4][Revolution_1_1/Generated_Face&Sketch_1/SketchLine_3]"), model.selection("EDGE", "[Cut_1_1/Modified_Face&Sketch_1/SketchLine_1][Common_1_1/Modified_Face&Sketch_2/SketchCircle_14_2]"), model.selection("EDGE", "[Revolution_1_1/Generated_Face&Sketch_1/SketchLine_5][ExtrusionCut_3_1/Modified_Face&Sketch_1/SketchLine_4]"), model.selection("EDGE", "[Revolution_1_1/Generated_Face&Sketch_1/SketchLine_7][Revolution_1_1/Generated_Face&Sketch_1/SketchLine_5]"), model.selection("EDGE", "[ExtrusionCut_3_1/Modified_Face&Sketch_1/SketchLine_4][ExtrusionCut_2_1/Modified_Face&Sketch_2/SketchCircle_5_2]"), model.selection("EDGE", "[ExtrusionCut_2_1/Modified_Face&Sketch_2/SketchCircle_5_2][(ExtrusionCut_2_1/Modified_Face&Sketch_2/SketchCircle_5_2)(ExtrusionCut_2_1/Generated_Face&Sketch_2/SketchCircle_6_2)]"), model.selection("EDGE", "[ExtrusionCut_1_1/Generated_Face&Sketch_2/SketchCircle_4_2][Cut_1_1/Modified_Face&Sketch_1/SketchLine_1]"), model.selection("EDGE", "[ExtrusionCut_1_1/Generated_Face&Sketch_2/SketchCircle_4_2][weak_name_3]"), model.selection("EDGE", "[ExtrusionCut_3_1/Generated_Face&Sketch_2/SketchCircle_15_2][weak_name_3]"), model.selection("EDGE", "[Revolution_1_1/Generated_Face&Sketch_1/SketchLine_3][Cut_1_1/Modified_Face&Sketch_1/SketchLine_1]"), model.selection("EDGE", "[ExtrusionCut_3_1/Generated_Face&Sketch_2/SketchCircle_15_2][Cut_1_1/Modified_Face&Sketch_1/SketchLine_1]"), model.selection("EDGE", "[ExtrusionCut_3_1/Modified_Face&Sketch_1/SketchLine_4][ExtrusionCut_1_1/Generated_Face&Sketch_2/SketchCircle_16_2]"), model.selection("EDGE", "[ExtrusionCut_3_1/Modified_Face&Sketch_1/SketchLine_4][ExtrusionCut_1_1/Generated_Face&Sketch_2/SketchCircle_17_2]"), model.selection("EDGE", "[ExtrusionCut_1_1/Generated_Face&Sketch_2/SketchCircle_17_2][weak_name_3]"), model.selection("EDGE", "[ExtrusionCut_1_1/Generated_Face&Sketch_2/SketchCircle_16_2][weak_name_3]"), model.selection("EDGE", "[ExtrusionCut_1_1/Generated_Face&Sketch_2/SketchCircle_16_2][Cut_1_1/Modified_Face&Sketch_1/SketchLine_1]"), model.selection("EDGE", "[ExtrusionCut_1_1/Generated_Face&Sketch_2/SketchCircle_17_2][Cut_1_1/Modified_Face&Sketch_1/SketchLine_1]"), model.selection("EDGE", "[Revolution_1_1/Generated_Face&Sketch_1/SketchLine_5][weak_name_3]"), model.selection("EDGE", "[Cut_1_1/Modified_Face&Sketch_1/SketchLine_1][ExtrusionCut_2_1/Generated_Face&Sketch_2/SketchCircle_11_2]"), model.selection("EDGE", "[ExtrusionCut_2_1/Modified_Face&Sketch_2/SketchCircle_7_2][(ExtrusionCut_2_1/Modified_Face&Sketch_2/SketchCircle_7_2)(ExtrusionCut_2_1/Generated_Face&Sketch_2/SketchCircle_8_2)]"), model.selection("EDGE", "[ExtrusionCut_2_1/Modified_Face&Sketch_2/SketchCircle_7_2][weak_name_5]"), model.selection("EDGE", "[Revolution_1_1/Generated_Face&Sketch_1/SketchLine_3][weak_name_3]"), model.selection("EDGE", "[ExtrusionCut_2_1/Generated_Face&Sketch_2/SketchCircle_8_2][weak_name_3]"), model.selection("EDGE", "[ExtrusionCut_3_1/Modified_Face&Sketch_1/SketchLine_4][ExtrusionCut_1_1/Generated_Face&Sketch_2/SketchCircle_2_2]"), model.selection("EDGE", "[ExtrusionCut_1_1/Generated_Face&Sketch_2/SketchCircle_2_2][weak_name_3]"), model.selection("EDGE", "[ExtrusionCut_1_1/Generated_Face&Sketch_2/SketchCircle_2_2][Cut_1_1/Modified_Face&Sketch_1/SketchLine_1]"), model.selection("EDGE", "[ExtrusionCut_2_1/Modified_Face&Sketch_2/SketchCircle_5_2][weak_name_3]"), model.selection("EDGE", "[ExtrusionCut_2_1/Generated_Face&Sketch_2/SketchCircle_6_2][weak_name_3]")]
-Group_2 = model.addGroup(Part_1_doc, Group_2_objects)
-Group_3_objects = [model.selection("FACE", "ExtrusionCut_2_1/Modified_Face&Sketch_2/SketchCircle_10_2"), model.selection("FACE", "ExtrusionCut_2_1/Generated_Face&Sketch_2/SketchCircle_11_2"), model.selection("FACE", "(ExtrusionCut_2_1/Modified_Face&Sketch_2/SketchCircle_10_2)(ExtrusionCut_2_1/Generated_Face&Sketch_2/SketchCircle_12_2)"), model.selection("FACE", "ExtrusionCut_1_1/Generated_Face&Sketch_2/SketchCircle_3_2"), model.selection("FACE", "Common_1_2/Modified_Face&Sketch_3/SketchLine_25"), model.selection("FACE", "ExtrusionCut_1_1/Generated_Face&Sketch_2/SketchCircle_4_2"), model.selection("FACE", "ExtrusionCut_2_1/Modified_Face&Sketch_2/SketchCircle_9_2"), model.selection("FACE", "(ExtrusionCut_2_1/Modified_Face&Sketch_2/SketchCircle_9_2)(ExtrusionCut_2_1/Generated_Face&Sketch_2/SketchCircle_11_2)"), model.selection("FACE", "Common_1_1/Modified_Face&Sketch_3/SketchLine_25"), model.selection("FACE", "Revolution_1_1/Generated_Face&Sketch_1/SketchLine_7"), model.selection("FACE", "ExtrusionCut_2_1/Generated_Face&Sketch_2/SketchCircle_11_2"), model.selection("FACE", "Cut_1_1/Modified_Face&Sketch_1/SketchLine_1"), model.selection("FACE", "ExtrusionCut_2_1/Modified_Face&Sketch_2/SketchCircle_5_2"), model.selection("FACE", "(ExtrusionCut_2_1/Modified_Face&Sketch_2/SketchCircle_5_2)(ExtrusionCut_2_1/Generated_Face&Sketch_2/SketchCircle_6_2)"), model.selection("FACE", "Common_1_1/Modified_Face&Sketch_2/SketchCircle_14_2"), model.selection("FACE", "ExtrusionCut_3_1/Modified_Face&Sketch_1/SketchLine_4"), model.selection("FACE", "Revolution_1_1/Generated_Face&Sketch_1/SketchLine_5"), model.selection("FACE", "ExtrusionCut_2_1/Generated_Face&Sketch_2/SketchCircle_11_2"), model.selection("FACE", "Common_1_2/Modified_Face&Sketch_2/SketchCircle_13_2"), model.selection("FACE", "Revolution_1_1/Generated_Face&Sketch_1/SketchLine_3"), model.selection("FACE", "ExtrusionCut_3_1/Generated_Face&Sketch_2/SketchCircle_15_2"), model.selection("FACE", "ExtrusionCut_1_1/Generated_Face&Sketch_2/SketchCircle_16_2"), model.selection("FACE", "ExtrusionCut_1_1/Generated_Face&Sketch_2/SketchCircle_17_2"), model.selection("FACE", "ExtrusionCut_2_1/Modified_Face&Sketch_2/SketchCircle_7_2"), model.selection("FACE", "ExtrusionCut_2_1/Generated_Face&Sketch_2/SketchCircle_11_2"), model.selection("FACE", "(ExtrusionCut_2_1/Modified_Face&Sketch_2/SketchCircle_7_2)(ExtrusionCut_2_1/Generated_Face&Sketch_2/SketchCircle_8_2)"), model.selection("FACE", "ExtrusionCut_1_1/Generated_Face&Sketch_2/SketchCircle_2_2")]
-Group_3 = model.addGroup(Part_1_doc, Group_3_objects)
 model.do()
+model.testHaveNamingSubshapes(Cut_1, model, Part_1_doc)
 model.end()
 
 assert(model.checkPythonDump())
index e0c97f8d48d9665db1c9939931d9a44ae8ab236e..caea5a405c6a99d975d6486954d2451aae924638 100644 (file)
@@ -202,7 +202,7 @@ Plane_4 = model.addPlane(Part_1_doc, model.selection("EDGE", "PartSet/OY"), mode
 Sketch_2 = model.addSketch(Part_1_doc, model.selection("FACE", "Plane_1"))
 SketchProjection_3 = Sketch_2.addProjection(model.selection("VERTEX", "Sketch_1/SketchPoint_2"), False)
 SketchPoint_3 = SketchProjection_3.createdFeature()
-SketchProjection_4 = Sketch_2.addProjection(model.selection("EDGE", "[Revolution_1_1/Generated_Face&Sketch_1/SketchLine_7][weak_name_2]"), False)
+SketchProjection_4 = Sketch_2.addProjection(model.selection("EDGE", "([Revolution_1_1/Generated_Face&Sketch_1/SketchArc_1_2][Revolution_1_1/Generated_Face&Sketch_1/SketchLine_7])([Revolution_1_1/Generated_Face&Sketch_1/SketchLine_7][Revolution_1_1/Generated_Face&Sketch_1/SketchLine_8])"), False)
 SketchLine_36 = SketchProjection_4.createdFeature()
 SketchCircle_1 = Sketch_2.addCircle(14.5, 0, 2.25)
 SketchConstraintCoincidence_38 = Sketch_2.setCoincident(SketchPoint_3.result(), SketchCircle_1.center())
index ab19886dd5879bb55fcd7739abac546a1eb43ed9..a7e817cde9a021fd81411a810246b6fb96bb5bb5 100644 (file)
@@ -31,7 +31,7 @@ Part_1 = model.addPart(partSet)
 Part_1_doc = Part_1.document()
 Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10)
 Cylinder_1.result().setName("cylinder")
-LinearCopy_1 = model.addMultiTranslation(Part_1_doc, [model.selection("SOLID", "cylinder")], model.selection("EDGE", "[cylinder/Face_1][weak_name_3]"), 10, NB_COPIES)
+LinearCopy_1 = model.addMultiTranslation(Part_1_doc, [model.selection("SOLID", "cylinder")], model.selection("EDGE", "([cylinder/Face_1][cylinder/Face_2])([cylinder/Face_1][cylinder/Face_3])"), 10, NB_COPIES)
 model.do()
 
 TransResult = LinearCopy_1.result()
index 383df810bf357b324f423ec5b27f5740d237f722..3a8cb09d70570b6030ededec38f72c4f8a902118 100644 (file)
@@ -28,7 +28,7 @@ Part_1 = model.addPart(partSet)
 Part_1_doc = Part_1.document()
 Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10)
 Cylinder_1.result().setName("cylinder")
-Translation_1 = model.addTranslation(Part_1_doc, [model.selection("SOLID", "cylinder")], model.selection("EDGE", "[cylinder/Face_1][weak_name_3]"), 20)
+Translation_1 = model.addTranslation(Part_1_doc, [model.selection("SOLID", "cylinder")], model.selection("EDGE", "([cylinder/Face_1][cylinder/Face_2])([cylinder/Face_1][cylinder/Face_3])"), 20)
 model.do()
 
 assert(Translation_1.result().name() == Cylinder_1.result().name()), "Translation name '{}' != '{}'".format(Translation_1.result().name(), Cylinder_1.result().name())
index 0901da33df4eac59c700ec4e17038152a6e23cd7..ca141637f7866829d2a0cffacf7e64cc0ba395f5 100644 (file)
@@ -40,6 +40,8 @@
 #include <TDataStd_ReferenceArray.hxx>
 #include <TDataStd_ExtStringList.hxx>
 #include <TDataStd_Integer.hxx>
+#include <TDataStd_UAttribute.hxx>
+
 
 /// type of the selection, integer keeps the Selector_Type value
 static const Standard_GUID kSEL_TYPE("db174d59-c2e3-4a90-955e-55544df090d6");
@@ -122,6 +124,7 @@ Selector_Algo* Selector_Algo::select(const TopoDS_Shape theContext, const TopoDS
       delete aContainer;
       return NULL;
     }
+
     Selector_Intersect* anIntersect = new Selector_Intersect;
     SET_ALGO_FLAGS(anIntersect);
     bool aGoodIntersector = anIntersect->select(theContext, theValue);
@@ -415,4 +418,6 @@ Selector_Algo* Selector_Algo::restoreByName(TDF_Label theLab, TDF_Label theBaseD
 void Selector_Algo::storeType(const Selector_Type theType)
 {
   TDataStd_Integer::Set(myLab, kSEL_TYPE, (int)(theType));
+  if (myGeometricalNaming)
+    TDataStd_UAttribute::Set(myLab, kGEOMETRICAL_NAMING);
 }
index f2149fe5e8746aa456bdbb854cf68f4a9bfb94cd..97eb30a491490a940df6ba120f8846ee114011f4 100644 (file)
@@ -108,6 +108,9 @@ public:
   /// Creates a new selection algorithm for selection of all topology based on the same geometry
   SELECTOR_EXPORT static Selector_Algo* relesectWithAllGeometry(
     Selector_Algo* theOldAlgo, const TopoDS_Shape theContext);
+  /// Sets geometrical naming flag to true
+  void setGeometricalNaming()
+  {myGeometricalNaming = true;}
 
 protected:
   /// Returns label where this algorithm is attached to, or just an access label to the document
index 440e65b334187ba751bcfb93fec8b5b6c0e6baa0..4d71686dbb2729dffcafcc766ce12ebde32317ef 100644 (file)
@@ -189,8 +189,9 @@ bool Selector_FilterByNeighbors::select(const TopoDS_Shape theContext, const Top
     }
     // iterate by the order in theContext to keep same naming names
     TopExp_Explorer anOrder(theContext, theValue.ShapeType());
+    TopTools_MapOfShape alreadyProcessed;
     for (; anOrder.More(); anOrder.Next()) {
-      if (aNewNB.Contains(anOrder.Current())) {
+      if (alreadyProcessed.Add(anOrder.Current()) && aNewNB.Contains(anOrder.Current())) {
         TopoDS_Shape aNewNBShape = anOrder.Current();
         // check which can be named correctly, without "by neighbors" type
         Selector_Algo* aSubAlgo = Selector_Algo::select(theContext, aNewNBShape,
index 5d003a2a98d69723828b5ae22d3abff4f7f744cf..2d0750b3720331ca49624bad4c335af85681931e 100644 (file)
@@ -63,6 +63,8 @@ static void commonShapes(const TopoDS_ListOfShape& theShapes, TopAbs_ShapeEnum t
 
 bool Selector_Intersect::select(const TopoDS_Shape theContext, const TopoDS_Shape theValue)
 {
+  if (!useIntersections())
+    return false;
   myShapeType = theValue.ShapeType();
   TopAbs_ShapeEnum aSelectionType = myShapeType;
   // try to find the shape of the higher level type in the context shape
@@ -132,7 +134,7 @@ bool Selector_Intersect::select(const TopoDS_Shape theContext, const TopoDS_Shap
       TopoDS_ListOfShape::Iterator anInt(aLastIntersectors);
       for (; anInt.More(); anInt.Next()) {
         Selector_Algo* aSubAlgo = Selector_Algo::select(theContext, anInt.Value(),
-          newSubLabel(), baseDocument(), geometricalNaming(), useNeighbors(), useIntersections());
+          newSubLabel(), baseDocument(), geometricalNaming(), useNeighbors(), false);
         if (!append(aSubAlgo))
           break; // if some selector is failed, stop and search another solution
       }
index c04ceb79a4dcf5588844da77355e96b3d35ee663..260d8da9d4c26218fdf88057dd61349687d837dc 100644 (file)
@@ -86,6 +86,8 @@ TDF_Label Selector_Selector::restoreByName(
   myAlgo = Selector_Algo::restoreByName(
     myLab, myBaseDocumentLab, theName, theShapeType, theNameGenerator, aResult);
   if (myAlgo) {
+    if (theGeometricalNaming)
+      myAlgo->setGeometricalNaming();
     return aResult;
   }
   return TDF_Label();
index 2681525fedfb1d4f761d10e6faaa2d8184d723b9..d6840ca0d4fea4f03d80d32bbd846ffb8ee30336 100644 (file)
@@ -127,14 +127,14 @@ SketchConstraintDistance_3 = Sketch_2.setDistance(SketchLine_10.startPoint(), Sk
 SketchConstraintDistance_4 = Sketch_2.setDistance(SketchLine_11.endPoint(), SketchLine_10.result(), 20)
 model.do()
 ExtrusionFuse_2 = model.addExtrusionFuse(Part_1_doc, [model.selection("FACE", "Sketch_2/Face-SketchLine_13r-SketchArc_2_2f-SketchLine_14f-SketchLine_9f-SketchLine_10f")], model.selection(), 0, 25, [model.selection("SOLID", "ExtrusionFuse_1_1")])
-Sketch_3 = model.addSketch(Part_1_doc, model.selection("FACE", "(ExtrusionFuse_2_1/Generated_Face&Sketch_2/SketchLine_9)(ExtrusionFuse_2_1/Generated_Face&Sketch_2/SketchLine_14)(ExtrusionFuse_2_1/Generated_Face&Sketch_2/SketchArc_2_2)(ExtrusionFuse_2_1/Generated_Face&Sketch_2/SketchLine_13)"))
+Sketch_3 = model.addSketch(Part_1_doc, model.selection("FACE", "(ExtrusionFuse_2_1/Generated_Face&Sketch_2/SketchLine_9)(ExtrusionFuse_2_1/Generated_Face&Sketch_2/SketchLine_14)(ExtrusionFuse_2_1/Modified_Face&ExtrusionFuse_1_1/From_Face)(ExtrusionFuse_2_1/Generated_Face&Sketch_2/SketchArc_2_2)(ExtrusionFuse_2_1/Generated_Face&Sketch_2/SketchLine_13)"))
 SketchLine_15 = Sketch_3.addLine(0, -20, -17.00000002635728, -20)
 SketchLine_15.setName("SketchLine_19")
 SketchLine_15.result().setName("SketchLine_19")
 SketchLine_16 = Sketch_3.addLine(-20, 0, 0, 0)
 SketchLine_16.setName("SketchLine_15")
 SketchLine_16.result().setName("SketchLine_15")
-SketchPoint_2 = Sketch_3.addPoint(model.selection("VERTEX", "[ExtrusionFuse_2_1/Generated_Face&Sketch_2/SketchLine_9][(ExtrusionFuse_2_1/Generated_Face&Sketch_2/SketchLine_9)(ExtrusionFuse_1_1/Generated_Face&Sketch_1/SketchLine_8)][(ExtrusionFuse_2_1/Generated_Face&Sketch_2/SketchLine_9)(ExtrusionFuse_2_1/Generated_Face&Sketch_2/SketchLine_14)(ExtrusionFuse_2_1/Generated_Face&Sketch_2/SketchArc_2_2)(ExtrusionFuse_2_1/Generated_Face&Sketch_2/SketchLine_13)][(ExtrusionFuse_1_1/Generated_Face&Sketch_1/SketchLine_8)(ExtrusionFuse_1_1/Generated_Face&Sketch_1/SketchArc_1_2)]"))
+SketchPoint_2 = Sketch_3.addPoint(model.selection("VERTEX", "[ExtrusionFuse_2_1/Generated_Face&Sketch_2/SketchLine_9][(ExtrusionFuse_2_1/Generated_Face&Sketch_2/SketchLine_9)(ExtrusionFuse_1_1/Generated_Face&Sketch_1/SketchLine_8)(ExtrusionFuse_2_1/Modified_Face&ExtrusionFuse_1_1/From_Face)][(ExtrusionFuse_2_1/Generated_Face&Sketch_2/SketchLine_9)(ExtrusionFuse_2_1/Generated_Face&Sketch_2/SketchLine_14)(ExtrusionFuse_2_1/Modified_Face&ExtrusionFuse_1_1/From_Face)(ExtrusionFuse_2_1/Generated_Face&Sketch_2/SketchArc_2_2)(ExtrusionFuse_2_1/Generated_Face&Sketch_2/SketchLine_13)][ExtrusionFuse_2_1/Modified_Face&ExtrusionFuse_1_1/From_Face]"))
 SketchConstraintCoincidence_23 = Sketch_3.setCoincident(SketchLine_16.endPoint(), SketchPoint_2.result())
 SketchLine_17 = Sketch_3.addLine(0, 0, 0, -20)
 SketchLine_17.setName("SketchLine_16")
@@ -175,7 +175,7 @@ SketchConstraintParallel_1 = Sketch_3.setParallel(SketchLine_17.result(), Sketch
 SketchConstraintDistance_7 = Sketch_3.setDistance(SketchLine_21.startPoint(), SketchLine_18.result(), 3)
 model.do()
 RevolutionFuse_1 = model.addRevolutionFuse(Part_1_doc, [model.selection("COMPOUND", "Sketch_3")], model.selection("EDGE", "Sketch_3/SketchLine_21"), 71, 0, [model.selection("SOLID", "ExtrusionFuse_2_1")])
-Sketch_4 = model.addSketch(Part_1_doc, model.selection("FACE", "(RevolutionFuse_1_1/Modified_Face&Sketch_1/SketchLine_1)(ExtrusionFuse_1_1/Generated_Face&Sketch_1/SketchLine_8)(ExtrusionFuse_1_1/Generated_Face&Sketch_1/SketchArc_1_2)(RevolutionFuse_1_1/Generated_Face&Sketch_3/SketchLine_16)(RevolutionFuse_1_1/Modified_Face&Sketch_1/SketchLine_7)"))
+Sketch_4 = model.addSketch(Part_1_doc, model.selection("FACE", "RevolutionFuse_1_1/Modified_Face&ExtrusionFuse_1_1/From_Face"))
 SketchLine_22 = Sketch_4.addLine(-3, -20, 17, -20)
 SketchLine_22.setName("SketchLine_26")
 SketchLine_22.result().setName("SketchLine_26")