1 # Copyright (C) 2014-2016 CEA/DEN, EDF R&D
3 # File: TestAPI_Translation.py
5 # Author: Clarisse Genrault (CEA)
7 from GeomAlgoAPI import GeomAlgoAPI_ShapeAPI as shaperpy
8 from GeomAlgoAPI import GeomAlgoAPI_Exception as myExcept
9 from GeomAPI import GeomAPI_Ax1 as axis
10 from GeomAPI import GeomAPI_Pnt as pnt
11 from GeomAPI import GeomAPI_Dir as direction
15 box = shaperpy.makeBox(10.,10.,10.)
20 # Perfom a translation with an axis and a distance.
22 origin = pnt(0.,0.,0.)
23 xDir = direction(1.,0.,0.)
24 xAxis = axis(origin, xDir)
25 translation1 = shaperpy.makeTranslation(box,xAxis,15.)
30 # Perfom a translation with dimensions.
32 translation2 = shaperpy.makeTranslation(box,10,0,0)