-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathSketcher_SnapLine.hxx
124 lines (101 loc) · 2.35 KB
/
Sketcher_SnapLine.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
116
117
118
119
120
121
122
123
124
/**
* \file Sketcher_SnapLine.hxx
* \brief Header file for the class Sketcher_SnapLine
* \author <a href="mailto:[email protected]?subject=Sketcher_SnapLine.hxx">Sergei Maslov</a>
*/
#ifndef Sketcher_SnapLine_H
#define Sketcher_SnapLine_H
#include "Sketcher_Snap.hxx"
#include <gp_Pnt2d.hxx>
#include <gp_Dir2d.hxx>
#include <gp_Lin2d.hxx>
#include <gp_Lin.hxx>
#include <gce_MakeDir2d.hxx>
#include <Geom2d_Line.hxx>
class gp_Dir2d;
class Geom2d_Line;
DEFINE_STANDARD_HANDLE(Sketcher_SnapLine,Sketcher_Snap)
//base class of snaps searching parallel/perpendicular lines
class Sketcher_SnapLine : public Sketcher_Snap
{
public:
// Type management
DEFINE_STANDARD_RTTIEXT(Sketcher_SnapLine, Sketcher_Snap)
/**
* \fn Sketcher_SnapLine()
* \brief Constructs a Sketcher_SnapLine
*/
Standard_EXPORT Sketcher_SnapLine();
/**
* \fn ~Sketcher_SnapLine()
* \brief Destructor
*/
Standard_EXPORT ~Sketcher_SnapLine();
/**
* \fn SelectEvent()
* \brief find new point
* \return void
*/
Standard_EXPORT virtual void SelectEvent() = 0;
/**
* \fn GetSnapType()
* \brief get Snap type
* \return Sketcher_SnapType
*/
Standard_EXPORT virtual Sketcher_SnapType GetSnapType() = 0;
/**
* \fn DrawRelation()
* \brief draw relation
* \return void
*/
Standard_EXPORT virtual void DrawRelation() = 0;
/**
* \fn EraseRelation()
* \brief erase relation
* \return void
*/
Standard_EXPORT virtual void EraseRelation() = 0;
/**
* \fn setFirstPnt(const gp_Pnt2d& p)
* \brief set point for exceptions
* \return void
* \param p const gp_Pnt2d&
*/
Standard_EXPORT void setFirstPnt(const gp_Pnt2d& p);
protected:
//methods
/**
* \fn SelectNearest()
* \brief select nearest line
* \return void
*/
Standard_EXPORT void SelectNearest();
/**
* \fn checkparallel()
* \brief check lines for parallel
* \return void
*/
Standard_EXPORT void checkparallel();
/**
* \fn ProjectPoint()
* \brief find point projected to line
* \return Standard_Boolean
*/
Standard_EXPORT Standard_Boolean ProjectPoint();
/**
* \fn ProjectPoint()
* \brief set Edges to display relation
* \return Standard_Boolean
*/
Standard_EXPORT void setEdges();
//members
Standard_Real minAngle;
Standard_Real curAngle;
gp_Pnt2d nearestPnt2d;
gp_Dir2d curDir2d;
gp_Dir2d tempDir2d;
Handle(Geom2d_Line) curGeom2d_Line;
Handle(Geom2d_Line) tempGeom2d_Line;
gp_Lin mygp_Lin1,mygp_Lin2;
};
#endif