Salome HOME
Adding the "Symmetry" feature.
[modules/shaper.git] / src / GeomAPI / GeomAPI_Trsf.h
1 // Copyright (C) 2014-2016 CEA/DEN, EDF R&D
2
3 // File:        GeomAPI_XYZ.hxx
4 // Created:     13 July 2015
5 // Author:      Mikhail PONIKAROV
6 //
7 // Modified by Clarisse Genrault (CEA) : 17 Nov 2016
8
9 #ifndef GeomAPI_Trsf_H_
10 #define GeomAPI_Trsf_H_
11
12 #include <GeomAPI_Interface.h>
13 #include <memory>
14
15 class GeomAPI_Ax1;
16 class GeomAPI_Ax2;
17 class GeomAPI_Pnt;
18
19 /**\class GeomAPI_Trsf
20  * \ingroup DataModel
21  * \brief Keep the transformation matrix coefficients
22  */
23
24 class GeomAPI_Trsf : public GeomAPI_Interface
25 {
26  public:
27   /// Keeps no transformation, it may be set by setImpl
28   GEOMAPI_EXPORT GeomAPI_Trsf();
29   /// Takes the pointer to existing transformation
30   GEOMAPI_EXPORT GeomAPI_Trsf(void* theTrsf);
31
32   /** \brief Sets a translation transformation.
33    *  \param[in] theAxis     translation axis.
34    *  \param[in] theDistance translation distance.
35    */
36   GEOMAPI_EXPORT void setTranslation(const std::shared_ptr<GeomAPI_Ax1> theAxis,
37                                      const double theDistance);
38
39   /** \brief Sets a translation transformation using three coordinates.
40    *  \param[in] theDx x coordinate of the translation vector
41    *  \param[in] theDy y coordinate of the translation vector
42    *  \param[in] theDz z coordinate of the translation vector
43    */
44   GEOMAPI_EXPORT void setTranslation(const double theDx,
45                                      const double theDy,
46                                      const double theDz);
47
48   /** \brief Sets a translation transformation using two points.
49    *  \param[in] theStartPoint  Start point of the translation vector.
50    *  \param[in] theEndPoint    End point of the translation vector.
51    */
52   GEOMAPI_EXPORT void setTranslation(const std::shared_ptr<GeomAPI_Pnt> theStartPoint,
53                                      const std::shared_ptr<GeomAPI_Pnt> theEndPoint);
54
55   /** \brief Sets a rotation transformation.
56    *  \param[in] theAxis  rotation axis.
57    *  \param[in] theAngle rotation angle(in degree).
58    */
59   GEOMAPI_EXPORT void setRotation(const std::shared_ptr<GeomAPI_Ax1> theAxis,
60                                   const double theAngle);
61
62   /** \brief Sets a point symmetry transformation.
63    *  \param[in] thePoint symmetry point.
64    */
65   GEOMAPI_EXPORT void setSymmetry(const std::shared_ptr<GeomAPI_Pnt> thePoint);
66
67   /** \brief Sets an axis symmetry transformation.
68    *  \param[in] theAxis symmetry axis.
69    */
70   GEOMAPI_EXPORT void setSymmetry(const std::shared_ptr<GeomAPI_Ax1> theAxis);
71
72   /** \brief Sets a plane symmetry transformation.
73    *  \param[in] thePlane symmetry plane.
74    */
75   GEOMAPI_EXPORT void setSymmetry(const std::shared_ptr<GeomAPI_Ax2> thePlane);
76 };
77
78 #endif
79