1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: GeomAPI_Trsf.cpp
4 // Created: 13 Jul 2015
5 // Author: Mikhail PONIKAROV
7 #include<GeomAPI_Trsf.h>
9 #include <GeomAPI_Ax1.h>
14 #define MY_TRSF implPtr<gp_Trsf>()
16 //=================================================================================================
17 GeomAPI_Trsf::GeomAPI_Trsf()
18 : GeomAPI_Interface(new gp_Trsf())
22 //=================================================================================================
23 void GeomAPI_Trsf::setTranslation(const std::shared_ptr<GeomAPI_Ax1> theAxis,
24 const double theDistance)
26 MY_TRSF->SetTranslation(gp_Vec(theAxis->impl<gp_Ax1>().Direction()) * theDistance);
29 //=================================================================================================
30 void GeomAPI_Trsf::setRotation(const std::shared_ptr<GeomAPI_Ax1> theAxis,
31 const double theAngle)
33 MY_TRSF->SetRotation(theAxis->impl<gp_Ax1>(), theAngle / 180.0 * M_PI);