Salome HOME
Merge remote-tracking branch 'remotes/origin/master' into CEA_2019
[modules/shaper.git] / src / FeaturesPlugin / Test / Test2419_1.py
index 8badeee3e7a8a978ca5adb6f0c341815b8d0ede3..6e71c4863d0a08c4a1c87b616cd8b454d9453bba 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-2019  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
+#
 
 from salome.shaper import model
 
@@ -81,7 +78,7 @@ SketchConstraintEqual_3.setName("SketchConstraintEqual_4")
 SketchConstraintEqual_4 = Sketch_1.setEqual(SketchLine_4.result(), SketchLine_1.result())
 SketchConstraintEqual_4.setName("SketchConstraintEqual_5")
 model.do()
-Face_1 = model.addFace(Part_1_doc, [model.selection("WIRE", "[Sketch_1/SubEdge&Sketch_1/SketchLine_1][Sketch_1/SubEdge&Sketch_1/SketchLine_3][Sketch_1/SubEdge&Sketch_1/SketchLine_4][Sketch_1/SubEdge&Sketch_1/SketchLine_5][Sketch_1/SubEdge&Sketch_1/SketchLine_6][Sketch_1/SubEdge&Sketch_1/SketchLine_7][Sketch_1/SubEdge&Sketch_1/SketchLine_9][Sketch_1/SketchArc_2_2][Sketch_1/SubEdge&Sketch_1/SketchLine_10]")])
+Face_1 = model.addFace(Part_1_doc, [model.selection("WIRE", "Sketch_1/Face-SketchLine_1r-SketchLine_3f-SketchLine_4f-SketchLine_5f-SketchLine_6f-SketchLine_7f-SketchLine_9f-SketchArc_2_2f-SketchLine_10r_wire")])
 Sketch_2 = model.addSketch(Part_1_doc, model.standardPlane("XOY"))
 SketchLine_11 = Sketch_2.addLine(40, 0, 30, 0)
 SketchLine_12 = Sketch_2.addLine(30, 0, 30, 10)
@@ -106,22 +103,22 @@ SketchConstraintEqual_5.setName("SketchConstraintEqual_1")
 model.do()
 Sketch_2.setName("Sketch_3")
 Sketch_2.result().setName("Sketch_3")
-Face_2 = model.addFace(Part_1_doc, [model.selection("WIRE", "[Sketch_3/SubEdge&Sketch_3/SketchLine_14][Sketch_3/SubEdge&Sketch_3/SketchLine_13][Sketch_3/SubEdge&Sketch_3/SketchLine_12][Sketch_3/SubEdge&Sketch_3/SketchLine_11]")])
+Face_2 = model.addFace(Part_1_doc, [model.selection("WIRE", "Sketch_3/Face-SketchLine_14r-SketchLine_13r-SketchLine_12r-SketchLine_11r_wire")])
 Face_2.setName("Face_5")
 Face_2.result().setName("Face_5_1")
 LinearCopy_1 = model.addMultiTranslation(Part_1_doc, [model.selection("FACE", "Face_5_1")], model.selection("EDGE", "Sketch_1/SketchLine_9"), 10, 2)
 LinearCopy_1.result().setName("LinearCopy")
-Fill_1 = model.addFill(Part_1_doc, [model.selection("FACE", "Face_1_1")], [model.selection("COMPOUND", "LinearCopy")])
+Split_1 = model.addSplit(Part_1_doc, [model.selection("FACE", "Face_1_1")], [model.selection("COMPOUND", "LinearCopy")])
 model.do()
 model.end()
 
 from GeomAPI import  GeomAPI_Shape
 
-model.testNbResults(Fill_1, 1)
-model.testNbSubResults(Fill_1, [3])
-model.testNbSubShapes(Fill_1, GeomAPI_Shape.SOLID, [0])
-model.testNbSubShapes(Fill_1, GeomAPI_Shape.FACE, [3])
-model.testNbSubShapes(Fill_1, GeomAPI_Shape.EDGE, [20])
-model.testNbSubShapes(Fill_1, GeomAPI_Shape.VERTEX, [40])
+model.testNbResults(Split_1, 1)
+model.testNbSubResults(Split_1, [3])
+model.testNbSubShapes(Split_1, GeomAPI_Shape.SOLID, [0])
+model.testNbSubShapes(Split_1, GeomAPI_Shape.FACE, [3])
+model.testNbSubShapes(Split_1, GeomAPI_Shape.EDGE, [20])
+model.testNbSubShapes(Split_1, GeomAPI_Shape.VERTEX, [40])
 
 assert(model.checkPythonDump())