Salome HOME
updated copyright message
[modules/shaper.git] / src / FeaturesPlugin / Test / Test2419_2.py
index b9fdb3b3083cb8857715e11262d9e39e5d9f9be8..bb262643ddb2a284679093b61f7c47431ed10e76 100644 (file)
@@ -1,24 +1,21 @@
-## Copyright (C) 2014-2017  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
-## License as published by the Free Software Foundation; either
-## version 2.1 of the License, or (at your option) any later version.
-##
-## This library is distributed in the hope that it will be useful,
-## but WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-## Lesser General Public License for more details.
-##
-## You should have received a copy of the GNU Lesser General Public
-## License along with this library; if not, write to the Free Software
-## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-##
-## See http:##www.salome-platform.org/ or
-## email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
-##
-
-# -*- coding: utf-8 -*-
+# Copyright (C) 2014-2023  CEA, EDF
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
 
 from salome.shaper import model
 
@@ -110,7 +107,7 @@ Group_2.result().setName("acier")
 Group_2.result().setColor(170, 85, 0)
 Sketch_3 = model.addSketch(Part_1_doc, model.standardPlane("XOY"))
 SketchLine_11 = Sketch_3.addLine(40, 0, 30, 0)
-SketchProjection_1 = Sketch_3.addProjection(model.selection("VERTEX", "[Face_4_1/Edge_6][Face_4_1/Edge_7]"), False)
+SketchProjection_1 = Sketch_3.addProjection(model.selection("VERTEX", "Face_4_1/Modified_Vertex&Sketch_1/SketchLine_9_StartVertex&Sketch_1/SketchLine_7_EndVertex"), False)
 SketchPoint_1 = SketchProjection_1.createdFeature()
 SketchConstraintCoincidence_19 = Sketch_3.setCoincident(SketchLine_11.endPoint(), SketchPoint_1.result())
 SketchConstraintCoincidence_19.setName("SketchConstraintCoincidence_19")
@@ -143,24 +140,24 @@ 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&Face_5_1/Edge_1]e[LinearCopy_3_1_1/ME:Translated_Edge&Face_5_1/Edge_4]e"))
+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/MV:Translated&Sketch_3/SketchLine_13_EndVertex&Sketch_3/SketchLine_14_StartVertex"))
 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"))
 LinearCopy_5 = model.addMultiTranslation(Part_1_doc, [model.selection("FACE", "Translation_4_1")], model.selection("EDGE", "PartSet/OX"), "length_assemblage", 2)
 Partition_1 = model.addPartition(Part_1_doc, [model.selection("FACE", "Face_1_1"), model.selection("FACE", "Face_2_1")])
-Fill_1_objects_2 = [model.selection("FACE", "Face_3_1"), model.selection("FACE", "Face_3_2"), model.selection("FACE", "Face_3_3"), model.selection("FACE", "Face_3_4"), model.selection("FACE", "Face_3_5"), model.selection("FACE", "Face_3_6"), model.selection("FACE", "Face_3_7"), model.selection("FACE", "Face_3_8"), model.selection("FACE", "Face_3_9"), model.selection("FACE", "Face_3_10"), model.selection("FACE", "Face_3_11"), model.selection("FACE", "Face_3_12"), model.selection("FACE", "Face_4_1"), model.selection("COMPOUND", "LinearCopy_1_1"), model.selection("COMPOUND", "LinearCopy_2_1"), model.selection("COMPOUND", "LinearCopy_3_1"), model.selection("COMPOUND", "LinearCopy_4_1"), model.selection("COMPOUND", "LinearCopy_5_1")]
-Fill_1 = model.addFill(Part_1_doc, [model.selection("COMPOUND", "Partition_1_1")], Fill_1_objects_2)
+Split_1_objects_2 = [model.selection("FACE", "Face_3_1"), model.selection("FACE", "Face_3_2"), model.selection("FACE", "Face_3_3"), model.selection("FACE", "Face_3_4"), model.selection("FACE", "Face_3_5"), model.selection("FACE", "Face_3_6"), model.selection("FACE", "Face_3_7"), model.selection("FACE", "Face_3_8"), model.selection("FACE", "Face_3_9"), model.selection("FACE", "Face_3_10"), model.selection("FACE", "Face_3_11"), model.selection("FACE", "Face_3_12"), model.selection("FACE", "Face_4_1"), model.selection("COMPOUND", "LinearCopy_1_1"), model.selection("COMPOUND", "LinearCopy_2_1"), model.selection("COMPOUND", "LinearCopy_3_1"), model.selection("COMPOUND", "LinearCopy_4_1"), model.selection("COMPOUND", "LinearCopy_5_1")]
+Split_1 = model.addSplit(Part_1_doc, [model.selection("COMPOUND", "Partition_1_1")], Split_1_objects_2)
 model.do()
 model.end()
 
 from GeomAPI import  GeomAPI_Shape
 
-model.testNbResults(Fill_1, 1)
-model.testNbSubResults(Fill_1, [60])
-model.testNbSubShapes(Fill_1, GeomAPI_Shape.SOLID, [0])
-model.testNbSubShapes(Fill_1, GeomAPI_Shape.FACE, [60])
-model.testNbSubShapes(Fill_1, GeomAPI_Shape.EDGE, [273])
-model.testNbSubShapes(Fill_1, GeomAPI_Shape.VERTEX, [546])
+model.testNbResults(Split_1, 1)
+model.testNbSubResults(Split_1, [60])
+model.testNbSubShapes(Split_1, GeomAPI_Shape.SOLID, [0])
+model.testNbSubShapes(Split_1, GeomAPI_Shape.FACE, [60])
+model.testNbSubShapes(Split_1, GeomAPI_Shape.EDGE, [273])
+model.testNbSubShapes(Split_1, GeomAPI_Shape.VERTEX, [546])
 
 assert(model.checkPythonDump())