]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fix for the unit tests due to names changing in issue #2375
authormpv <mpv@opencascade.com>
Tue, 23 Jan 2018 11:08:01 +0000 (14:08 +0300)
committermpv <mpv@opencascade.com>
Tue, 23 Jan 2018 11:08:18 +0000 (14:08 +0300)
src/FeaturesPlugin/Test/Test2172.py
src/FeaturesPlugin/Test/Test2197_1.py
src/FeaturesPlugin/Test/Test2197_2.py
src/FeaturesPlugin/Test/Test2197_3.py
src/FeaturesPlugin/Test/Test2197_4.py
src/FeaturesPlugin/Test/Test2233.py
src/ModelAPI/Test/TestCustomName_Placement.py

index 65c4daca79a78c2cd49178ab0a3a7209ab5545c4..993dceb2e55f66aea12ba82aa5cb2c9a6b87bca4 100644 (file)
@@ -74,7 +74,7 @@ SketchConstraintDistance_4 = Sketch_1.setDistance(SketchCircle_1.center(), Sketc
 model.do()
 Revolution_1 = model.addRevolution(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchCircle_1_2f-SketchLine_8f")], model.selection("EDGE", "PartSet/OZ"), 360, 0)
 Revolution_2 = model.addRevolution(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchCircle_2_2f-SketchLine_7r")], model.selection("EDGE", "PartSet/OZ"), 360, 0)
-Group_1 = model.addGroup(Part_1_doc, [model.selection("EDGE", "Revolution_1_1/Lateral_Edge_1"), model.selection("EDGE", "Revolution_1_1/Lateral_Edge_2"), model.selection("EDGE", "Revolution_1_1/Base_Edge_1"), model.selection("EDGE", "Revolution_1_1/Base_Edge_2"), model.selection("EDGE", "Revolution_2_1/Lateral_Edge_1"), model.selection("EDGE", "Revolution_2_1/Lateral_Edge_2"), model.selection("EDGE", "Revolution_2_1/Lateral_Edge_3"), model.selection("EDGE", "Revolution_2_1/Base_Edge_2"), model.selection("EDGE", "Revolution_2_1/Base_Edge_3"), model.selection("EDGE", "Revolution_2_1/Base_Edge_1")])
+Group_1 = model.addGroup(Part_1_doc, [model.selection("EDGE", "Revolution_1_1/Lateral_2"), model.selection("EDGE", "Revolution_1_1/Lateral_4"), model.selection("EDGE", "Revolution_1_1/Base_Edge_6"), model.selection("EDGE", "Revolution_1_1/Base_Edge_8"), model.selection("EDGE", "Revolution_2_1/Base_Edge_8"), model.selection("EDGE", "Revolution_2_1/Lateral_2"), model.selection("EDGE", "Revolution_2_1/Lateral_4"), model.selection("EDGE", "Revolution_2_1/Base_Edge_10"), model.selection("EDGE", "Revolution_2_1/Base_Edge_12"), model.selection("EDGE", "Revolution_2_1/Lateral_6")])
 model.end()
 
 # check that resulting group selection is valid
index e157deb798919c28daec776f562dc463e08e1419..4375edb71d180f9c4c732660e1128480e1b7d0b6 100644 (file)
@@ -29,8 +29,8 @@ SketchCircle_1 = Sketch_1.addCircle(-150, 79, -50, 79)
 SketchCircle_2 = Sketch_1.addCircle(-155, 278, -10, 278)
 model.do()
 Revolution_1 = model.addRevolution(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchCircle_1_2f-SketchCircle_2_2f")], model.selection("EDGE", "PartSet/OZ"), 360, 0)
-Group_1 = model.addGroup(Part_1_doc, [model.selection("EDGE", "Revolution_1_1/Base_Edge_1"), model.selection("EDGE", "Revolution_1_1/Base_Edge_2"), model.selection("EDGE", "Revolution_1_1/Base_Edge_3")])
-Group_2 = model.addGroup(Part_1_doc, [model.selection("EDGE", "Revolution_1_1/Lateral_Edge_1"), model.selection("EDGE", "Revolution_1_1/Lateral_Edge_2"), model.selection("EDGE", "Revolution_1_1/Lateral_Edge_3")])
+Group_1 = model.addGroup(Part_1_doc, [model.selection("EDGE", "Revolution_1_1/Base_Edge_8"), model.selection("EDGE", "Revolution_1_1/Base_Edge_10"), model.selection("EDGE", "Revolution_1_1/Base_Edge_12")])
+Group_2 = model.addGroup(Part_1_doc, [model.selection("EDGE", "Revolution_1_1/Lateral_2"), model.selection("EDGE", "Revolution_1_1/Lateral_4"), model.selection("EDGE", "Revolution_1_1/Lateral_6")])
 model.end()
 
 # check that resulting group selection is valid
index c32cd440b1ae8ed65e5f405a3d8a6f348eb7dc46..cedd7f88f41aeb07d5e20fe4737f636e5c5291e1 100644 (file)
@@ -29,9 +29,9 @@ SketchCircle_1 = Sketch_1.addCircle(-150, 80, 100)
 model.do()
 Face_1 = model.addFace(Part_1_doc, [model.selection("EDGE", "Sketch_1/Edge-SketchCircle_1_2")])
 Revolution_1 = model.addRevolution(Part_1_doc, [model.selection("FACE", "Face_1_1")], model.selection("EDGE", "PartSet/OZ"), 360, 0)
-Group_1 = model.addGroup(Part_1_doc, [model.selection("EDGE", "Revolution_1_1/Base_Edge_1")])
-Group_2 = model.addGroup(Part_1_doc, [model.selection("EDGE", "Revolution_1_1/Lateral_Edge_1")])
-Group_3 = model.addGroup(Part_1_doc, [model.selection("VERTEX", "Revolution_1_1/Lateral_Edge_1&Revolution_1_1/Base_Edge_1")])
+Group_1 = model.addGroup(Part_1_doc, [model.selection("EDGE", "Revolution_1_1/Base_Edge_4")])
+Group_2 = model.addGroup(Part_1_doc, [model.selection("EDGE", "Revolution_1_1/Lateral_2")])
+Group_3 = model.addGroup(Part_1_doc, [model.selection("VERTEX", "Revolution_1_1/Lateral_2&Revolution_1_1/Base_Edge_4")])
 model.end()
 
 # check that resulting group selection is valid
index 6ce089431641e386e80f32c1eaaecae588be27e1..dc6122bb31735e62789ffd2ccc7ccff959231d78 100644 (file)
@@ -36,7 +36,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_1f-SketchLine_2f-SketchLine_3f-SketchLine_4f")], model.selection("EDGE", "Sketch_1/Edge-SketchLine_4"), 360, 0)
-Group_1 = model.addGroup(Part_1_doc, [model.selection("EDGE", "Revolution_1_1/Lateral_Edge_3"), model.selection("EDGE", "Revolution_1_1/Base_Edge_2"), model.selection("EDGE", "Revolution_1_1/Lateral_Edge_2"), model.selection("EDGE", "Revolution_1_1/Base_Edge_1"), model.selection("EDGE", "Revolution_1_1/Base_Edge_3")])
+Group_1 = model.addGroup(Part_1_doc, [model.selection("EDGE", "Revolution_1_1/Lateral_4"), model.selection("EDGE", "Revolution_1_1/Base_Edge_10"), model.selection("EDGE", "Revolution_1_1/Lateral_6"), model.selection("EDGE", "Revolution_1_1/Base_Edge_12"), model.selection("EDGE", "Revolution_1_1/Base_Edge_14")])
 model.end()
 
 # check that resulting group selection is valid
index d68bbf00c05ec1336ae72d513fbaf97c13d6e57f..8478aebcfa0cca4a3f0b146db751e7957e643417 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_1f-SketchLine_3f-SketchLine_4f-SketchLine_5r-SketchLine_6r")], model.selection("EDGE", "Sketch_1/Edge-SketchLine_4"), 360, 0)
-Group_1 = model.addGroup(Part_1_doc, [model.selection("EDGE", "Revolution_1_1/Generated_Face_5&Revolution_1_1/Generated_Face_4"), model.selection("EDGE", "Revolution_1_1/Generated_Face_4&Revolution_1_1/Generated_Face_3"), model.selection("EDGE", "Revolution_1_1/Generated_Face_3&Revolution_1_1/Generated_Face_2"), model.selection("EDGE", "Revolution_1_1/Base_Edge_2"), model.selection("EDGE", "Revolution_1_1/Base_Edge_1"), model.selection("EDGE", "Revolution_1_1/Generated_Face_4"), model.selection("EDGE", "Revolution_1_1/Generated_Face_3")])
+Group_1 = model.addGroup(Part_1_doc, [model.selection("EDGE", "Revolution_1_1/Generated_Face_5&Revolution_1_1/Generated_Face_4"), model.selection("EDGE", "Revolution_1_1/Generated_Face_4&Revolution_1_1/Generated_Face_3"), model.selection("EDGE", "Revolution_1_1/Generated_Face_3&Revolution_1_1/Generated_Face_2"), model.selection("EDGE", "Revolution_1_1/Base_Edge_4"), model.selection("EDGE", "Revolution_1_1/Base_Edge_2"), model.selection("EDGE", "Revolution_1_1/Generated_Face_4"), model.selection("EDGE", "Revolution_1_1/Generated_Face_3")])
 model.end()
 
 # check that resulting group selection is valid
index 5c6d5f20935ae3fcaae2cf0c16068776c17485fc..c4015977df849cdfc993d76ef0967a62693ae033 100644 (file)
@@ -38,7 +38,7 @@ SketchConstraintCoincidence_4 = Sketch_1.setCoincident(SketchArc_1.startPoint(),
 SketchConstraintCoincidence_5 = Sketch_1.setCoincident(SketchLine_2.endPoint(), SketchArc_1.endPoint())
 model.do()
 Revolution_1 = model.addRevolution(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchArc_1_2f-SketchLine_2f")], model.selection("EDGE", "Sketch_1/Edge-SketchLine_2"), 360, 0)
-Group_1 = model.addGroup(Part_1_doc, [model.selection("VERTEX", "Revolution_1_1/Vertex_1"), model.selection("VERTEX", "Revolution_1_1/Vertex_2")])
+Group_1 = model.addGroup(Part_1_doc, [model.selection("VERTEX", "Revolution_1_1/Vertex_6"), model.selection("VERTEX", "Revolution_1_1/Vertex_8")])
 model.end()
 
 # check that resulting group selection is valid and names are different
index b8cd116e425e83ba8d5f85ae79fa1b7996053fea..ad2043f7f860a5283f896890ad27928609eac428 100644 (file)
@@ -46,7 +46,7 @@ Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_1/
 Extrusion_1.result().setName("prism")
 Revolution_1 = model.addRevolution(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_5r-SketchLine_6r-SketchLine_7r")], model.selection("EDGE", "Sketch_1/Edge-SketchLine_6"), 360, 0)
 Revolution_1.result().setName("spinner")
-Placement_1 = model.addPlacement(Part_1_doc, [model.selection("SOLID", "spinner")], model.selection("VERTEX", "spinner/Lateral_Edge_1&spinner/Base_Edge_1"), model.selection("FACE", "prism/Generated_Face_2"), False, True)
+Placement_1 = model.addPlacement(Part_1_doc, [model.selection("SOLID", "spinner")], model.selection("VERTEX", "spinner/Lateral_6&spinner/Base_Edge_10"), model.selection("FACE", "prism/Generated_Face_2"), False, True)
 model.do()
 
 assert(Placement_1.result().name() == Revolution_1.result().name()), "Placement name '{}' != '{}'".format(Placement_1.result().name(), Revolution_1.result().name())