-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathSketcher_CommandBezierCurve.hxx
115 lines (92 loc) · 2.62 KB
/
Sketcher_CommandBezierCurve.hxx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
/**
* \file Sketcher_CommandBezierCurve.hxx
* \brief Header file for the class Sketcher_CommandBezierCurve
* \author <a href="mailto:[email protected]?subject=Sketcher_CommandBezierCurve.hxx">Sergei Maslov</a>
*/
#ifndef Sketcher_CommandBezierCurve_H
#define Sketcher_CommandBezierCurve_H
#include "Sketcher_Command.hxx"
#include <TColgp_Array1OfPnt2d.hxx>
#include <TColgp_Array1OfPnt.hxx>
#include <Geom2d_BezierCurve.hxx>
#include <Geom_BezierCurve.hxx>
#include <BRepBuilderAPI_MakeEdge.hxx>
#include <TopoDS_Edge.hxx>
#include <AIS_Shape.hxx>
#define MAXIMUMPOLES 16
class AIS_Line;
DEFINE_STANDARD_HANDLE(Sketcher_CommandBezierCurve,Sketcher_Command)
//Command Managerial entering BezierCurve by points
class Sketcher_CommandBezierCurve : public Sketcher_Command
{
public:
// Type management
DEFINE_STANDARD_RTTIEXT(Sketcher_CommandBezierCurve, Sketcher_Command)
enum BezierCurveAction { Nothing,Input_1Point,Input_2Point,Input_OtherPoints };
/**
* \fn Sketcher_CommandBezierCurve()
* \brief Constructs a Sketcher_CommandBezierCurve
*/
Standard_EXPORT Sketcher_CommandBezierCurve();
/**
* \fn ~Sketcher_CommandBezierCurve()
* \brief destructor
*/
Standard_EXPORT ~Sketcher_CommandBezierCurve();
/**
* \fn Action()
* \brief turn command to active state
*/
Standard_EXPORT void Action();
/**
* \fn MouseInputEvent(const gp_Pnt2d& thePnt2d )
* \brief input event handler
* \return Standard_Boolean
* \param thePnt2d const gp_Pnt2d&
*/
Standard_EXPORT Standard_Boolean MouseInputEvent(const gp_Pnt2d& thePnt2d);
/**
* \fn MouseMoveEvent(const gp_Pnt2d& thePnt2d )
* \brief mouse move handler
* \return void
* \param thePnt2d const gp_Pnt2d&
*/
Standard_EXPORT void MouseMoveEvent(const gp_Pnt2d& thePnt2d);
/**
* \fn CancelEvent()
* \brief cancel event handler, stop entering object
* \return void
*/
Standard_EXPORT void CancelEvent();
/**
* \fn GetTypeOfMethod()
* \brief get command Method
* \return Sketcher_ObjectTypeOfMethod
*/
Standard_EXPORT Sketcher_ObjectTypeOfMethod GetTypeOfMethod();
private:
//methods
/**
* \fn closeBezierCurve()
* \brief display Bezier Curve, add to list of objects
* \return void
*/
Standard_EXPORT void closeBezierCurve();
/**
* \fn storePoles()
* \brief display Pole point, add to list of objects
* \return void
*/
Standard_EXPORT void storePoles();
//members
BezierCurveAction myBezierCurveAction;
Handle(Geom2d_BezierCurve) myGeom2d_BezierCurve;
Handle(Geom_BezierCurve) myGeom_BezierCurve;
TopoDS_Edge curEdge;
Handle(AIS_Shape) myRubberAIS_Shape;
gp_Pnt2d tempPnt2d;
gp_Pnt myFirstgp_Pnt;
gp_Pnt tempPnt;
Standard_Integer IndexCounter;
};
#endif