1 // Copyright (C) 2014-2016 CEA/DEN, EDF R&D
3 // File: GeomAPI_Trsf.cpp
4 // Created: 13 Jul 2015
5 // Author: Mikhail PONIKAROV
7 // Modified by Clarisse Genrault (CEA) : 17 Nov 2016
9 #include<GeomAPI_Trsf.h>
11 #include <GeomAPI_Ax1.h>
16 #define MY_TRSF implPtr<gp_Trsf>()
18 //=================================================================================================
19 GeomAPI_Trsf::GeomAPI_Trsf()
20 : GeomAPI_Interface(new gp_Trsf())
24 //=================================================================================================
25 GeomAPI_Trsf::GeomAPI_Trsf(void* theTrsf)
26 : GeomAPI_Interface(theTrsf)
30 //=================================================================================================
31 void GeomAPI_Trsf::setTranslation(const std::shared_ptr<GeomAPI_Ax1> theAxis,
32 const double theDistance)
34 MY_TRSF->SetTranslation(gp_Vec(theAxis->impl<gp_Ax1>().Direction()) * theDistance);
37 //=================================================================================================
38 void GeomAPI_Trsf::setTranslation(const double theDx, const double theDy, const double theDz)
40 MY_TRSF->SetTranslation(gp_Vec(theDx, theDy, theDz));
43 //=================================================================================================
44 void GeomAPI_Trsf::setRotation(const std::shared_ptr<GeomAPI_Ax1> theAxis,
45 const double theAngle)
47 MY_TRSF->SetRotation(theAxis->impl<gp_Ax1>(), theAngle / 180.0 * M_PI);