Salome HOME
updated copyright message
[modules/shaper.git] / src / ModelAPI / Test / Test2241.py
index b574ba9e821eddd2a08e258fa88d7e2f15c65c6f..885ba7540929c97a82b925f22db3bb08a5876fd7 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2014-2019  CEA/DEN, EDF R&D
+# Copyright (C) 2014-2023  CEA/DEN, EDF R&D
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -17,8 +17,6 @@
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
-# -*- coding: utf-8 -*-
-
 from salome.shaper import model
 
 model.begin()
@@ -102,7 +100,7 @@ Face_4_objects = [model.selection("EDGE", "Sketch_2/SketchCircle_1_2"), model.se
 Face_4 = model.addFace(Part_1_doc, Face_4_objects)
 Sketch_3 = model.addSketch(Part_1_doc, model.standardPlane("XOY"))
 SketchLine_11 = Sketch_3.addLine(40, 0, 30, 0)
-SketchPoint_1 = Sketch_3.addPoint(model.selection("VERTEX", "[Face_1_1/Edge_6]e[Face_1_1/Edge_7]e"))
+SketchPoint_1 = Sketch_3.addPoint(model.selection("VERTEX", "Face_1_1/Modified_Vertex&Sketch_1/SketchLine_9_StartVertex&Sketch_1/SketchLine_7_EndVertex"))
 SketchConstraintCoincidence_19 = Sketch_3.setCoincident(SketchLine_11.endPoint(), SketchPoint_1.result())
 SketchConstraintCoincidence_19.setName("SketchConstraintCoincidence_19")
 SketchLine_12 = Sketch_3.addLine(30, 0, 30, 10)
@@ -128,16 +126,16 @@ model.do()
 Face_5 = model.addFace(Part_1_doc, [model.selection("WIRE", "Sketch_3/Face-SketchLine_14r-SketchLine_13r-SketchLine_12r-SketchLine_11r_wire")])
 LinearCopy_1 = model.addMultiTranslation(Part_1_doc, [model.selection("FACE", "Face_5_1")], model.selection("EDGE", "PartSet/OX"), "l", 4, model.selection("EDGE", "PartSet/OY"), "l", 2)
 Recover_1 = model.addRecover(Part_1_doc, LinearCopy_1, [Face_5.result()])
-Translation_1 = model.addTranslation(Part_1_doc, [model.selection("FACE", "Recover_1_1")], model.selection("VERTEX", "[Face_4_1/Edge_6]e[Face_4_1/Edge_7]e"), model.selection("VERTEX", "[Face_4_1/Edge_4]e[Face_4_1/Edge_5]e"))
+Translation_1 = model.addTranslation(Part_1_doc, [model.selection("FACE", "Recover_1_1")], model.selection("VERTEX", "Face_4_1/Modified_Vertex&Sketch_1/SketchLine_9_StartVertex&Sketch_1/SketchLine_7_EndVertex"), model.selection("VERTEX", "Face_4_1/Modified_Vertex&Sketch_1/SketchLine_6_StartVertex&Sketch_1/SketchLine_5_EndVertex"))
 LinearCopy_2 = model.addMultiTranslation(Part_1_doc, [model.selection("FACE", "Translation_1_1")], model.selection("EDGE", "PartSet/OX"), "l", 4, model.selection("EDGE", "PartSet/OY"), "l", 2)
 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", "[Face_4_1/Edge_6]e[Face_4_1/Edge_7]e"), model.selection("VERTEX", "[Face_4_1/Edge_2]e[Face_4_1/Edge_3]e"))
+Translation_2 = model.addTranslation(Part_1_doc, [model.selection("FACE", "Recover_2_1")], model.selection("VERTEX", "Face_4_1/Modified_Vertex&Sketch_1/SketchLine_9_StartVertex&Sketch_1/SketchLine_7_EndVertex"), model.selection("VERTEX", "Face_4_1/Modified_Vertex&Sketch_1/SketchLine_4_StartVertex&Sketch_1/SketchLine_3_EndVertex"))
 LinearCopy_3 = model.addMultiTranslation(Part_1_doc, [model.selection("FACE", "Translation_2_1")], model.selection("EDGE", "PartSet/OX"), "l", 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", "[Face_4_1/Edge_6]e[Face_4_1/Edge_7]e"), 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_2]e"))
+Translation_3 = model.addTranslation(Part_1_doc, [model.selection("FACE", "Recover_3_1")], model.selection("VERTEX", "Face_4_1/Modified_Vertex&Sketch_1/SketchLine_9_StartVertex&Sketch_1/SketchLine_7_EndVertex"), model.selection("VERTEX", "LinearCopy_3_1_1/MV:Translated&Sketch_3/SketchLine_12_EndVertex&Sketch_3/SketchLine_13_StartVertex"))
 LinearCopy_4 = model.addMultiTranslation(Part_1_doc, [model.selection("FACE", "Translation_3_1")], model.selection("EDGE", "PartSet/OX"), "l", 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", "[Face_4_1/Edge_6]e[Face_4_1/Edge_7]e"), model.selection("VERTEX", "[Face_4_1/Edge_1]e[Face_4_1/Edge_9]e"))
+Translation_4 = model.addTranslation(Part_1_doc, [model.selection("FACE", "Recover_4_1")], model.selection("VERTEX", "Face_4_1/Modified_Vertex&Sketch_1/SketchLine_9_StartVertex&Sketch_1/SketchLine_7_EndVertex"), model.selection("VERTEX", "Face_4_1/Modified_Vertex&Sketch_1/SketchLine_10_StartVertex&Sketch_1/SketchLine_1_StartVertex"))
 LinearCopy_5 = model.addMultiTranslation(Part_1_doc, [model.selection("FACE", "Translation_4_1")], model.selection("EDGE", "PartSet/OX"), "l", 2)
 Group_1_objects = [model.selection("FACE", "LinearCopy_4_1_2"), model.selection("FACE", "LinearCopy_1_1_8"), model.selection("FACE", "LinearCopy_1_1_4"), model.selection("FACE", "LinearCopy_1_1_3"), model.selection("FACE", "LinearCopy_1_1_6"), model.selection("FACE", "LinearCopy_1_1_2"), model.selection("FACE", "LinearCopy_1_1_7"), model.selection("FACE", "LinearCopy_2_1_3"), model.selection("FACE", "LinearCopy_3_1_4"), model.selection("FACE", "LinearCopy_2_1_8"), model.selection("FACE", "LinearCopy_2_1_4"), model.selection("FACE", "LinearCopy_2_1_7"), model.selection("FACE", "LinearCopy_4_1_3"), model.selection("FACE", "LinearCopy_1_1_1"), model.selection("FACE", "LinearCopy_5_1_2"), model.selection("FACE", "LinearCopy_4_1_1"), model.selection("FACE", "LinearCopy_5_1_1"), model.selection("FACE", "LinearCopy_3_1_3"), model.selection("FACE", "LinearCopy_3_1_2"), model.selection("FACE", "LinearCopy_3_1_1"), model.selection("FACE", "LinearCopy_2_1_6"), model.selection("FACE", "LinearCopy_2_1_2"), model.selection("FACE", "LinearCopy_2_1_5"), model.selection("FACE", "LinearCopy_2_1_1"), model.selection("FACE", "LinearCopy_1_1_5")]
 Group_1 = model.addGroup(Part_1_doc, Group_1_objects)
@@ -176,3 +174,6 @@ for Group in [Group_1, Group_2, Group_3]:
   for a in range(Group.groupList().size()):
     assert(Group.groupList().value(a).value().shapeTypeStr() == "FACE")
     assert(len(Group.groupList().value(a).namingName()) > 0)
+
+# for the issue #2892 check fix
+assert(model.checkPythonDump())