Salome HOME
19cdccb2ed1580255fbc50945cc48bd4d269d75e
[modules/shaper.git] / src / PartSet / PartSet_Tools.h
1 // File:        PartSet_Tools.h
2 // Created:     28 Apr 2014
3 // Author:      Natalia ERMOLAEVA
4
5 #ifndef PartSet_Tools_H
6 #define PartSet_Tools_H
7
8 #include "PartSet.h"
9
10 #include <gp_Pnt.hxx>
11
12 #include <QPoint>
13
14 #include <boost/shared_ptr.hpp>
15
16 class Handle_V3d_View;
17 class ModelAPI_Feature;
18
19 /*!
20  \class PartSet_Tools
21  * \brief The operation for the sketch feature creation
22 */
23 class PARTSET_EXPORT PartSet_Tools
24 {
25 public:
26   /// Converts the 2D screen point to the 3D point on the view according to the point of view
27   /// \param thePoint a screen point
28   /// \param theView a 3D view
29   static gp_Pnt ConvertClickToPoint(QPoint thePoint, Handle_V3d_View theView);
30
31   /// \brief Converts the 3D point to the projected coodinates on the sketch plane.
32   /// \param thePoint the 3D point in the viewer
33   /// \param theSketch the sketch feature
34   /// \param theX the X coordinate
35   /// \param theY the Y coordinate
36   static void ConvertTo2D(const gp_Pnt& thePoint, boost::shared_ptr<ModelAPI_Feature> theSketch,
37                           Handle(V3d_View) theView, double& theX, double& theY);
38 };
39
40 #endif