Salome HOME
Renaming the direct API high level.
[modules/shaper.git] / src / PrimitivesPlugin / Test / APIDirectTestBox.py
1 from GeomAlgoAPI import GeomAlgoAPI_ShapeAPI as shaperpy
2 from GeomAlgoAPI import GeomAlgoAPI_Exception as myExcept
3 from GeomAPI import GeomAPI_Pnt as pnt
4
5 # Create a box with dimensions    
6 try :    
7   box1 = shaperpy.makeBox(5.,15.,5.)
8   
9 except myExcept,ec:
10   print ec.what()
11
12 # Create a box with two points defining the diagonal   
13 try :    
14   pnt1 = pnt(0.,0.,0.)
15   pnt2 = pnt(10.,10.,10.)
16   box2 = shaperpy.makeBox(pnt1,pnt2)
17   
18 except myExcept,ec:
19   print ec.what()
20   
21
22 # Create a box with null dimensions
23 try :    
24   box3 = shaperpy.makeBox(0.,0.,0.)
25   
26 except myExcept,ec:
27   print ec.what()