Salome HOME
updated copyright message
[modules/shaper.git] / test.API / SHAPER / Transformations / TestTranslation_2.py
index 0f3e3e9e2158dccd1bf4e610aabb06661d4f6d90..35bb5f36c44854f31ee1c6470f0058443ab172ef 100644 (file)
@@ -1,22 +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>
-##
+# 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
+#
 
 """
 Test case for Translation feature.
@@ -81,7 +80,7 @@ SketchConstraintCoincidence_3 = Sketch_1.setCoincident(SketchLine_1.startPoint()
 model.do()
 
 # Edges
-Edge_1 = model.addEdge(Part_1_doc, [model.selection("EDGE", "Sketch_1/Edge-SketchLine_2")])
+Edge_1 = model.addEdge(Part_1_doc, [model.selection("EDGE", "Sketch_1/SketchLine_2")])
 
 # Axis
 Axis_1 = model.addAxis(Part_1_doc, 10, 10, 10)
@@ -91,47 +90,47 @@ model.addParameter(Part_1_doc, "d", "15")
 
 # Translation 27
 Translation_27_1 = model.addTranslation(Part_1_doc, [model.selection("SOLID", "Box_1_1")], model.selection("EDGE", "PartSet/OX"), 5)
-Intersection_1 = model.addIntersection(Part_1_doc, [model.selection("SOLID", "Box_2_1")], [model.selection("SOLID", "Translation_1_1")])
+Intersection_1 = model.addIntersection(Part_1_doc, [model.selection("SOLID", "Box_2_1")model.selection("SOLID", "Translation_1_1")])
 Translation_27 = model.addTranslation(Part_1_doc, [model.selection("COMPOUND", "Intersection_1_1")], model.selection("EDGE", "PartSet/OX"), 15)
 
 # Translation 28
 Translation_28_1 = model.addTranslation(Part_1_doc, [model.selection("SOLID", "Box_3_1")], model.selection("EDGE", "PartSet/OX"), 5)
-Intersection_2 = model.addIntersection(Part_1_doc, [model.selection("SOLID", "Box_4_1")], [model.selection("SOLID", "Translation_3_1")])
+Intersection_2 = model.addIntersection(Part_1_doc, [model.selection("SOLID", "Box_4_1")model.selection("SOLID", "Translation_3_1")])
 Translation_28 = model.addTranslation(Part_1_doc, [model.selection("COMPOUND", "Intersection_2_1")], model.selection("EDGE", "PartSet/OX"), 0)
 
 # Translation 29
 Translation_29_1 = model.addTranslation(Part_1_doc, [model.selection("SOLID", "Box_5_1")], model.selection("EDGE", "PartSet/OX"), 5)
-Intersection_3 = model.addIntersection(Part_1_doc, [model.selection("SOLID", "Box_6_1")], [model.selection("SOLID", "Translation_5_1")])
+Intersection_3 = model.addIntersection(Part_1_doc, [model.selection("SOLID", "Box_6_1")model.selection("SOLID", "Translation_5_1")])
 Translation_29 = model.addTranslation(Part_1_doc, [model.selection("COMPOUND", "Intersection_3_1")], model.selection("EDGE", "PartSet/OX"), -15)
 
 # Translation 30
 Translation_30_1 = model.addTranslation(Part_1_doc, [model.selection("SOLID", "Box_7_1")], model.selection("EDGE", "PartSet/OX"), 5)
-Intersection_4 = model.addIntersection(Part_1_doc, [model.selection("SOLID", "Box_8_1")], [model.selection("SOLID", "Translation_7_1")])
+Intersection_4 = model.addIntersection(Part_1_doc, [model.selection("SOLID", "Box_8_1")model.selection("SOLID", "Translation_7_1")])
 Translation_30 = model.addTranslation(Part_1_doc, [model.selection("COMPOUND", "Intersection_4_1")], model.selection("EDGE", "InvalidName"), -15)
 
 # Translation 31
 Translation_31_1 = model.addTranslation(Part_1_doc, [model.selection("SOLID", "Box_9_1")], model.selection("EDGE", "PartSet/OX"), 5)
-Intersection_5 = model.addIntersection(Part_1_doc, [model.selection("SOLID", "Box_10_1")], [model.selection("SOLID", "Translation_9_1")])
+Intersection_5 = model.addIntersection(Part_1_doc, [model.selection("SOLID", "Box_10_1")model.selection("SOLID", "Translation_9_1")])
 Translation_31 = model.addTranslation(Part_1_doc, [model.selection("COMPOUND", "Intersection_5_1")], model.selection("EDGE", "PartSet/OY"), "d")
 
 # Translation 32
 Translation_32_1 = model.addTranslation(Part_1_doc, [model.selection("SOLID", "Box_11_1")], model.selection("EDGE", "PartSet/OX"), 5)
-Intersection_6 = model.addIntersection(Part_1_doc, [model.selection("SOLID", "Box_12_1")], [model.selection("SOLID", "Translation_11_1")])
-Translation_32 = model.addTranslation(Part_1_doc, [model.selection("COMPOUND", "Intersection_6_1")], model.selection("EDGE", "Sketch_1/Edge-SketchLine_1"), 15)
+Intersection_6 = model.addIntersection(Part_1_doc, [model.selection("SOLID", "Box_12_1")model.selection("SOLID", "Translation_11_1")])
+Translation_32 = model.addTranslation(Part_1_doc, [model.selection("COMPOUND", "Intersection_6_1")], model.selection("EDGE", "Sketch_1/SketchLine_1"), 15)
 
 # Translation 33
 Translation_33_1 = model.addTranslation(Part_1_doc, [model.selection("SOLID", "Box_13_1")], model.selection("EDGE", "PartSet/OX"), 5)
-Intersection_7 = model.addIntersection(Part_1_doc, [model.selection("SOLID", "Box_14_1")], [model.selection("SOLID", "Translation_13_1")])
+Intersection_7 = model.addIntersection(Part_1_doc, [model.selection("SOLID", "Box_14_1")model.selection("SOLID", "Translation_13_1")])
 Translation_33 = model.addTranslation(Part_1_doc, [model.selection("COMPOUND", "Intersection_7_1")], model.selection("EDGE", "Edge_1_1"), 15)
 
 # Translation 34
 Translation_34_1 = model.addTranslation(Part_1_doc, [model.selection("SOLID", "Box_15_1")], model.selection("EDGE", "PartSet/OX"), 5)
-Intersection_8 = model.addIntersection(Part_1_doc, [model.selection("SOLID", "Box_16_1")], [model.selection("SOLID", "Translation_15_1")])
+Intersection_8 = model.addIntersection(Part_1_doc, [model.selection("SOLID", "Box_16_1")model.selection("SOLID", "Translation_15_1")])
 Translation_34 = model.addTranslation(Part_1_doc, [model.selection("COMPOUND", "Intersection_8_1")], model.selection("EDGE", "Intersection_8_1_6"), 15)
 
 # Translation 35
 Translation_35_1 = model.addTranslation(Part_1_doc, [model.selection("SOLID", "Box_17_1")], model.selection("EDGE", "PartSet/OX"), 5)
-Intersection_9 = model.addIntersection(Part_1_doc, [model.selection("SOLID", "Box_18_1")], [model.selection("SOLID", "Translation_17_1")])
+Intersection_9 = model.addIntersection(Part_1_doc, [model.selection("SOLID", "Box_18_1")model.selection("SOLID", "Translation_17_1")])
 Translation_35 = model.addTranslation(Part_1_doc, [model.selection("COMPOUND", "Intersection_9_1")], model.selection("EDGE", "Axis_1"), 15)
 
 #Translation 36
@@ -162,7 +161,7 @@ Translation_40 = model.addTranslation(Part_1_doc, [model.selection("COMPSOLID",
 # Translation 41
 Translation_41_1 = model.addTranslation(Part_1_doc, [model.selection("SOLID", "Box_29_1")], model.selection("EDGE", "PartSet/OX"), 5)
 Partition_6 = model.addPartition(Part_1_doc, [model.selection("SOLID", "Box_30_1"), model.selection("SOLID", "Translation_29_1")])
-Translation_41 = model.addTranslation(Part_1_doc, [model.selection("COMPSOLID", "Partition_6_1")], model.selection("EDGE", "Sketch_1/Edge-SketchLine_1"), 15)
+Translation_41 = model.addTranslation(Part_1_doc, [model.selection("COMPSOLID", "Partition_6_1")], model.selection("EDGE", "Sketch_1/SketchLine_1"), 15)
 
 # Translation 42
 Translation_42_1 = model.addTranslation(Part_1_doc, [model.selection("SOLID", "Box_31_1")], model.selection("EDGE", "PartSet/OX"), 5)
@@ -289,12 +288,13 @@ model.testNbSubShapes(Translation_42, GeomAPI_Shape.FACE, [18])
 model.testHaveNamingFaces(Translation_42, model, Part_1_doc)
 
 # Translation 43
-model.testNbResults(Translation_43, 1)
-model.testNbSubResults(Translation_43, [3])
-model.testNbSubShapes(Translation_43, GeomAPI_Shape.COMPSOLID, [1])
-model.testNbSubShapes(Translation_43, GeomAPI_Shape.SOLID, [3])
-model.testNbSubShapes(Translation_43, GeomAPI_Shape.FACE, [18])
-model.testHaveNamingFaces(Translation_43, model, Part_1_doc)
+# It is concealed by Partition_9
+#model.testNbResults(Translation_43, 1)
+#model.testNbSubResults(Translation_43, [3])
+#model.testNbSubShapes(Translation_43, GeomAPI_Shape.COMPSOLID, [1])
+#model.testNbSubShapes(Translation_43, GeomAPI_Shape.SOLID, [3])
+#model.testNbSubShapes(Translation_43, GeomAPI_Shape.FACE, [18])
+#model.testHaveNamingFaces(Translation_43, model, Part_1_doc)
 
 # Translation 44
 model.testNbResults(Translation_44, 1)