]> SALOME platform Git repositories - modules/shaper.git/blobdiff - test.API/SHAPER/Primitives/TestTorus.py
Salome HOME
updated copyright message
[modules/shaper.git] / test.API / SHAPER / Primitives / TestTorus.py
index a60d9daf35ee265dc1282eea362cd13230c7d42c..d7bc45cf1c06969c7001c52fd04a36777809b49b 100644 (file)
@@ -1,3 +1,21 @@
+# Copyright (C) 2017-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
 
 model.begin()
@@ -27,6 +45,7 @@ Torus_8 = model.addTorus(Part_1_doc, Point_1, Axis_1, 15, 4)
 Torus_9 = model.addTorus(Part_1_doc, Point_2, model.selection("EDGE", "PartSet/OZ"), 15, 4)
 Torus_10 = model.addTorus(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), Axis_2, 15, 4)
 Torus_11 = model.addTorus(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), "r", "ring")
+Torus_12 = model.addTorus(Part_1_doc, 15, 4)
 
 model.do()
 model.end()
@@ -58,6 +77,12 @@ model.testNbSubShapes(Torus_11, GeomAPI_Shape.SOLID, [1])
 model.testNbSubShapes(Torus_11, GeomAPI_Shape.FACE, [1])
 model.testHaveNamingFaces(Torus_11, model, Part_1_doc)
 
+model.testNbResults(Torus_12, 1)
+model.testNbSubResults(Torus_12, [0])
+model.testNbSubShapes(Torus_12, GeomAPI_Shape.SOLID, [1])
+model.testNbSubShapes(Torus_12, GeomAPI_Shape.FACE, [1])
+model.testHaveNamingFaces(Torus_12, model, Part_1_doc)
+
 model.testNbResults(Torus_2, 0)
 assert(Torus_2.feature().error() == "Torus builder :: ring radius is greater than the radius.")