Sphere_5 = shaperpy.makeSphere(None, 10.)
except myExcept as ec:
assert(ec.what() == "Sphere builder :: center is not valid.")
+
+Sphere_6 = shaperpy.makeSphere(10., 40.,0,180.,0.,180.)
+try:
+ Sphere_7 = shaperpy.makeSphere(40., 10.,0,180.,0.,180.)
+except myExcept as ec:
+ assert(ec.what() == "Sphere builder :: RMin is larger than RMax.")
\ No newline at end of file
Sphere_7 = model.addSphere(Part_1_doc, 10)
Sphere_7.setCenterPoint(Point_1)
+Sphere_8 = model.addSphere(Part_1_doc,10,40,0,180,0,180)
+Sphere_9 = model.addSphere(Part_1_doc,40,10,0,180,0,180)
+
model.do()
model.end()
model.testNbSubShapes(Sphere_7, GeomAPI_Shape.FACE, [1])
model.testHaveNamingFaces(Sphere_7, model, Part_1_doc)
+model.testNbResults(Sphere_8, 1)
+model.testNbSubResults(Sphere_8, [0])
+model.testNbSubShapes(Sphere_8, GeomAPI_Shape.SOLID, [1])
+model.testNbSubShapes(Sphere_8, GeomAPI_Shape.FACE, [4])
+model.testHaveNamingFaces(Sphere_8, model, Part_1_doc)
+
model.testNbResults(Sphere_2, 0)
assert(Sphere_2.feature().error() == "Sphere builder :: radius is negative or null.")
model.testNbResults(Sphere_5, 0)
assert(Sphere_5.feature().error() == "Attribute \"center_point\" is not initialized.")
+
+model.testNbResults(Sphere_9, 0)
+assert(Sphere_9.feature().error() == "Sphere builder :: RMin is larger than RMax.")