Salome HOME
Issue #1942: group - names are empty strings
[modules/shaper.git] / src / GeomAlgoAPI / Test / TestAPI_Scale.py
1 # Copyright (C) 2014-201x CEA/DEN, EDF R&D
2
3 # File:        TestAPI_Scale.py
4 # Created:     25 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 GeomAPI import GeomAPI_Pnt as pnt
10
11 # Create a box
12 try :
13   box1 = shaperpy.makeBox(10.,10.,10.)
14   centerPoint = pnt(20.,20.,0.)
15  
16 except myExcept, ec:
17   print ec.what()
18
19 # Perfom a scale by a factor.
20 try :
21   scale1 = shaperpy.makeScale(box1,centerPoint, -1.6)
22  
23 except myExcept, ec:
24   print ec.what()