+# 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()
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()
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.")