Salome HOME
Update copyrights
[modules/shaper.git] / test.API / SHAPER / Transformations / TestScale.py
index 94e033664cfe416022f3a9c253c85f232121b1eb..55fe459ab5e98e3ee250a033ae3800726e512e9a 100644 (file)
@@ -1,5 +1,24 @@
+# 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
+#
+
 """
-Test case for Scale feature. 
+Test case for Scale feature.
 Written on High API.
 """
 from salome.shaper import model
@@ -50,25 +69,25 @@ model.do()
 Point_1 = model.addPoint(Part_1_doc, -10, -10, -10)
 
 # Create Vertexes
-Vertex_1 = model.addVertex(Part_1_doc, [model.selection("VERTEX", "Sketch_1/Vertex-SketchLine_1e")])
+Vertex_1 = model.addVertex(Part_1_doc, [model.selection("VERTEX", "Sketch_1/SketchLine_1_EndVertex")])
 
 # Create Wire & Extrusion
-Wire_1 = model.addWire(Part_1_doc, [model.selection("WIRE", "Sketch_2/Wire-SketchLine_2f-SketchLine_3f-SketchLine_4f-SketchLine_5f-SketchLine_6f")])
+Wire_1 = model.addWire(Part_1_doc, [model.selection("WIRE", "Sketch_2/Face-SketchLine_2r-SketchLine_3f-SketchLine_4f-SketchLine_5f-SketchLine_6f_wire")])
 Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("WIRE", "Wire_1_1")], model.selection(), 50, 0)
 
 # Create Scales
 Scale_1 = model.addScale(Part_1_doc, [model.selection("SOLID", "Box_1_1")] , model.selection("VERTEX", "PartSet/Origin"), 2)
 Scale_2 = model.addScale(Part_1_doc, [model.selection("SOLID", "Box_2_1")] , model.selection("VERTEX", "Point_1"), 2)
-Scale_3 = model.addScale(Part_1_doc, [model.selection("SOLID", "Box_3_1")] , model.selection("VERTEX", "Box_3_1/Back&Box_3_1/Left&Box_3_1/Top"), 2)
-Scale_4 = model.addScale(Part_1_doc, [model.selection("SOLID", "Box_4_1")] , model.selection("VERTEX", "Sketch_1/Vertex-SketchLine_1e"), 2)
+Scale_3 = model.addScale(Part_1_doc, [model.selection("SOLID", "Box_3_1")] , model.selection("VERTEX", "[Box_3_1/Back][Box_3_1/Left][Box_3_1/Top]"), 2)
+Scale_4 = model.addScale(Part_1_doc, [model.selection("SOLID", "Box_4_1")] , model.selection("VERTEX", "Sketch_1/SketchLine_1_EndVertex"), 2)
 Scale_5 = model.addScale(Part_1_doc, [model.selection("SOLID", "Box_5_1")] , model.selection("VERTEX", "Vertex_1_1"), 2)
 Scale_6 = model.addScale(Part_1_doc, [model.selection("SOLID", "Box_6_1")] , model.selection("VERTEX", "PartSet/Origin"), 0)
 Scale_7 = model.addScale(Part_1_doc, [model.selection("SOLID", "Box_7_1")] , model.selection("VERTEX", "PartSet/Origin"), -3)
 Scale_8 = model.addScale(Part_1_doc, [model.selection("SOLID", "Box_8_1")] , model.selection("VERTEX", "InvalidName"), 2)
 Scale_9 = model.addScale(Part_1_doc, [model.selection("SOLID", "Box_9_1")] , model.selection("VERTEX", "PartSet/Origin"), 2 , 3, 1)
 Scale_10 = model.addScale(Part_1_doc, [model.selection("SOLID", "Box_10_1")] , model.selection("VERTEX", "Point_1"), 2 , 3, 1)
-Scale_11 = model.addScale(Part_1_doc, [model.selection("SOLID", "Box_11_1")] , model.selection("VERTEX", "Box_11_1/Back&Box_11_1/Right&Box_11_1/Top"), 2 , 3, 1)
-Scale_12 = model.addScale(Part_1_doc, [model.selection("SOLID", "Box_12_1")] , model.selection("VERTEX", "Sketch_1/Vertex-SketchLine_1e"), 2 , 3, 1)
+Scale_11 = model.addScale(Part_1_doc, [model.selection("SOLID", "Box_11_1")] , model.selection("VERTEX", "[Box_11_1/Back][Box_11_1/Right][Box_11_1/Top]"), 2 , 3, 1)
+Scale_12 = model.addScale(Part_1_doc, [model.selection("SOLID", "Box_12_1")] , model.selection("VERTEX", "Sketch_1/SketchLine_1_EndVertex"), 2 , 3, 1)
 Scale_13 = model.addScale(Part_1_doc, [model.selection("SOLID", "Box_13_1")] , model.selection("VERTEX", "Vertex_1_1"), 2 , 3, 1)
 Scale_14 = model.addScale(Part_1_doc, [model.selection("SOLID", "Box_14_1")] , model.selection("VERTEX", "PartSet/Origin"), 0 , 3, 1)
 Scale_15 = model.addScale(Part_1_doc, [model.selection("SOLID", "Box_15_1")] , model.selection("VERTEX", "PartSet/Origin"), 2 , 0, 1)
@@ -181,4 +200,4 @@ assert(Scale_18.feature().error() == 'Attribute "center_point" is not initialize
 #model.testNbSubShapes(Scale_19, GeomAPI_Shape.SHELL, [1])
 #model.testNbSubShapes(Scale_19, GeomAPI_Shape.SOLID, [0])
 #model.testNbSubShapes(Scale_19, GeomAPI_Shape.FACE, [5])
-#model.testHaveNamingFaces(Scale_19, model, Part_1_doc)
\ No newline at end of file
+#model.testHaveNamingFaces(Scale_19, model, Part_1_doc)