summaryrefslogtreecommitdiff
path: root/inc/ChFiDS_CommonPoint.lxx
blob: 0860bf9e80249bfe23b29c9528ac5a5480f361d0 (plain)
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
125
126
127
128
129
130
// File:	ChFiDS_CommonPoint.lxx
// Created:	Tue Nov 30 17:49:11 1993
// Author:	Isabelle GRIGNON
//		<isg@zerox>


//=======================================================================
//function : SetVertex
//purpose  : 
//=======================================================================

 inline void  ChFiDS_CommonPoint::SetVertex(const TopoDS_Vertex& V)
{
  isvtx = Standard_True;
  vtx = V;
}


//=======================================================================
//function : SetPoint
//purpose  : 
//=======================================================================

 inline void  ChFiDS_CommonPoint::SetPoint(const gp_Pnt& Point)
{
  point = Point;
}

//=======================================================================
//function : SetVector
//purpose  : 
//=======================================================================

 inline void  ChFiDS_CommonPoint::SetVector(const gp_Vec& Vector)
{
  hasvector = Standard_True;
  vector = Vector;
}

//=======================================================================
//function : SetTolerance
//purpose  : 
// PMN : 30/09/1997 : On se contente d'updater la tolerance.
//=======================================================================

 inline void  ChFiDS_CommonPoint::SetTolerance(const Standard_Real Tol)
{
  if (Tol>tol) tol = Tol;
}


//=======================================================================
//function : Tolerance
//purpose  : 
//=======================================================================

 inline Standard_Real  ChFiDS_CommonPoint::Tolerance()const 
{
  return tol;
}


//=======================================================================
//function : IsVertex
//purpose  : 
//=======================================================================

 inline Standard_Boolean  ChFiDS_CommonPoint::IsVertex()const 
{
  return isvtx;
}


//=======================================================================
//function : Vertex
//purpose  : 
//=======================================================================

 inline const TopoDS_Vertex&  ChFiDS_CommonPoint::Vertex()const 
{
  if (!isvtx) {Standard_DomainError::Raise();}
  return vtx;
}

//=======================================================================
//function : Point
//purpose  : 
//=======================================================================

 inline const gp_Pnt&  ChFiDS_CommonPoint::Point()const 
{
  return point;
}

//=======================================================================
//function : HasVector
//purpose  : 
//=======================================================================

 inline Standard_Boolean  ChFiDS_CommonPoint::HasVector()const 
{
  return hasvector;
}

//=======================================================================
//function : Vector
//purpose  : 
//=======================================================================

 inline const gp_Vec&  ChFiDS_CommonPoint::Vector()const 
{
  if (!hasvector) {
    Standard_DomainError::Raise("ChFiDS_CommonPoint::Vector");
  }
  return vector;
}

//=======================================================================
//function : IsOnArc
//purpose  : 
//=======================================================================

 inline Standard_Boolean  ChFiDS_CommonPoint::IsOnArc()const 
{
  return isonarc;
}