Integration of OCCT 6.5.0 from SVN
[occt.git] / src / ChFiDS / ChFiDS_CommonPoint.lxx
1 // File:        ChFiDS_CommonPoint.lxx
2 // Created:     Tue Nov 30 17:49:11 1993
3 // Author:      Isabelle GRIGNON
4 //              <isg@zerox>
5
6
7 //=======================================================================
8 //function : SetVertex
9 //purpose  : 
10 //=======================================================================
11
12  inline void  ChFiDS_CommonPoint::SetVertex(const TopoDS_Vertex& V)
13 {
14   isvtx = Standard_True;
15   vtx = V;
16 }
17
18
19 //=======================================================================
20 //function : SetPoint
21 //purpose  : 
22 //=======================================================================
23
24  inline void  ChFiDS_CommonPoint::SetPoint(const gp_Pnt& Point)
25 {
26   point = Point;
27 }
28
29 //=======================================================================
30 //function : SetVector
31 //purpose  : 
32 //=======================================================================
33
34  inline void  ChFiDS_CommonPoint::SetVector(const gp_Vec& Vector)
35 {
36   hasvector = Standard_True;
37   vector = Vector;
38 }
39
40 //=======================================================================
41 //function : SetTolerance
42 //purpose  : 
43 // PMN : 30/09/1997 : On se contente d'updater la tolerance.
44 //=======================================================================
45
46  inline void  ChFiDS_CommonPoint::SetTolerance(const Standard_Real Tol)
47 {
48   if (Tol>tol) tol = Tol;
49 }
50
51
52 //=======================================================================
53 //function : Tolerance
54 //purpose  : 
55 //=======================================================================
56
57  inline Standard_Real  ChFiDS_CommonPoint::Tolerance()const 
58 {
59   return tol;
60 }
61
62
63 //=======================================================================
64 //function : IsVertex
65 //purpose  : 
66 //=======================================================================
67
68  inline Standard_Boolean  ChFiDS_CommonPoint::IsVertex()const 
69 {
70   return isvtx;
71 }
72
73
74 //=======================================================================
75 //function : Vertex
76 //purpose  : 
77 //=======================================================================
78
79  inline const TopoDS_Vertex&  ChFiDS_CommonPoint::Vertex()const 
80 {
81   if (!isvtx) {Standard_DomainError::Raise();}
82   return vtx;
83 }
84
85 //=======================================================================
86 //function : Point
87 //purpose  : 
88 //=======================================================================
89
90  inline const gp_Pnt&  ChFiDS_CommonPoint::Point()const 
91 {
92   return point;
93 }
94
95 //=======================================================================
96 //function : HasVector
97 //purpose  : 
98 //=======================================================================
99
100  inline Standard_Boolean  ChFiDS_CommonPoint::HasVector()const 
101 {
102   return hasvector;
103 }
104
105 //=======================================================================
106 //function : Vector
107 //purpose  : 
108 //=======================================================================
109
110  inline const gp_Vec&  ChFiDS_CommonPoint::Vector()const 
111 {
112   if (!hasvector) {
113     Standard_DomainError::Raise("ChFiDS_CommonPoint::Vector");
114   }
115   return vector;
116 }
117
118 //=======================================================================
119 //function : IsOnArc
120 //purpose  : 
121 //=======================================================================
122
123  inline Standard_Boolean  ChFiDS_CommonPoint::IsOnArc()const 
124 {
125   return isonarc;
126 }
127
128
129
130