Salome HOME
Issue #1942: group - names are empty strings
[modules/shaper.git] / src / GeomAlgoAPI / Test / TestAPI_Cylinder.py
1 # Copyright (C) 2014-201x CEA/DEN, EDF R&D
2
3 # File:        TestAPI_Cylinder.py
4 # Created:     13 Jan 2017
5 # Author:      Clarisse Genrault (CEA)
6
7 from GeomAlgoAPI import GeomAlgoAPI_ShapeAPI as shaperpy
8 from GeomAlgoAPI import GeomAlgoAPI_Exception as myExcept
9 from GeomAlgoAPI import GeomAlgoAPI_EdgeBuilder as edgeBuilder
10 from GeomAPI import GeomAPI_Pnt as pnt
11
12 aPoint = pnt(10.,5.,0.)
13 anEdge = edgeBuilder.line(1.,0.,0.)
14
15 # Create a cylinder
16 try :    
17   cylinder1 = shaperpy.makeCylinder(5., 20.)
18   
19 except myExcept,ec:
20   print ec.what()
21
22 # Create a cylinder
23 try :    
24   cylinder2 = shaperpy.makeCylinder(5., 20., 100.)
25   
26 except myExcept,ec:
27   print ec.what()
28   
29 # Create a cylinder
30 try :
31   cylinder3 = shaperpy.makeCylinder(aPoint, anEdge, 5., 20.)
32   
33 except myExcept,ec:
34   print ec.what()
35   
36 # Create a cylinder
37 try :
38   cylinder4 = shaperpy.makeCylinder(aPoint, anEdge, 5., 20., 180.)
39   
40 except myExcept,ec:
41   print ec.what()