b311480e |
1 | // Created on: 1993-11-30 |
2 | // Created by: Isabelle GRIGNON |
3 | // Copyright (c) 1993-1999 Matra Datavision |
973c2be1 |
4 | // Copyright (c) 1999-2014 OPEN CASCADE SAS |
b311480e |
5 | // |
973c2be1 |
6 | // This file is part of Open CASCADE Technology software library. |
b311480e |
7 | // |
973c2be1 |
8 | // This library is free software; you can redistribute it and / or modify it |
9 | // under the terms of the GNU Lesser General Public version 2.1 as published |
10 | // by the Free Software Foundation, with special exception defined in the file |
11 | // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT |
12 | // distribution for complete text of the license and disclaimer of any warranty. |
b311480e |
13 | // |
973c2be1 |
14 | // Alternatively, this file may be used under the terms of Open CASCADE |
15 | // commercial license or contractual agreement. |
7fd59977 |
16 | |
17 | //======================================================================= |
18 | //function : SetVertex |
19 | //purpose : |
20 | //======================================================================= |
21 | |
b311480e |
22 | inline void ChFiDS_CommonPoint::SetVertex(const TopoDS_Vertex& V) |
7fd59977 |
23 | { |
24 | isvtx = Standard_True; |
25 | vtx = V; |
26 | } |
27 | |
28 | |
29 | //======================================================================= |
30 | //function : SetPoint |
31 | //purpose : |
32 | //======================================================================= |
33 | |
34 | inline void ChFiDS_CommonPoint::SetPoint(const gp_Pnt& Point) |
35 | { |
36 | point = Point; |
37 | } |
38 | |
39 | //======================================================================= |
40 | //function : SetVector |
41 | //purpose : |
42 | //======================================================================= |
43 | |
44 | inline void ChFiDS_CommonPoint::SetVector(const gp_Vec& Vector) |
45 | { |
46 | hasvector = Standard_True; |
47 | vector = Vector; |
48 | } |
49 | |
50 | //======================================================================= |
51 | //function : SetTolerance |
52 | //purpose : |
53 | // PMN : 30/09/1997 : On se contente d'updater la tolerance. |
54 | //======================================================================= |
55 | |
56 | inline void ChFiDS_CommonPoint::SetTolerance(const Standard_Real Tol) |
57 | { |
58 | if (Tol>tol) tol = Tol; |
59 | } |
60 | |
61 | |
62 | //======================================================================= |
63 | //function : Tolerance |
64 | //purpose : |
65 | //======================================================================= |
66 | |
67 | inline Standard_Real ChFiDS_CommonPoint::Tolerance()const |
68 | { |
69 | return tol; |
70 | } |
71 | |
72 | |
73 | //======================================================================= |
74 | //function : IsVertex |
75 | //purpose : |
76 | //======================================================================= |
77 | |
78 | inline Standard_Boolean ChFiDS_CommonPoint::IsVertex()const |
79 | { |
80 | return isvtx; |
81 | } |
82 | |
83 | |
84 | //======================================================================= |
85 | //function : Vertex |
86 | //purpose : |
87 | //======================================================================= |
88 | |
89 | inline const TopoDS_Vertex& ChFiDS_CommonPoint::Vertex()const |
90 | { |
91 | if (!isvtx) {Standard_DomainError::Raise();} |
92 | return vtx; |
93 | } |
94 | |
95 | //======================================================================= |
96 | //function : Point |
97 | //purpose : |
98 | //======================================================================= |
99 | |
100 | inline const gp_Pnt& ChFiDS_CommonPoint::Point()const |
101 | { |
102 | return point; |
103 | } |
104 | |
105 | //======================================================================= |
106 | //function : HasVector |
107 | //purpose : |
108 | //======================================================================= |
109 | |
110 | inline Standard_Boolean ChFiDS_CommonPoint::HasVector()const |
111 | { |
112 | return hasvector; |
113 | } |
114 | |
115 | //======================================================================= |
116 | //function : Vector |
117 | //purpose : |
118 | //======================================================================= |
119 | |
120 | inline const gp_Vec& ChFiDS_CommonPoint::Vector()const |
121 | { |
122 | if (!hasvector) { |
123 | Standard_DomainError::Raise("ChFiDS_CommonPoint::Vector"); |
124 | } |
125 | return vector; |
126 | } |
127 | |
128 | //======================================================================= |
129 | //function : IsOnArc |
130 | //purpose : |
131 | //======================================================================= |
132 | |
133 | inline Standard_Boolean ChFiDS_CommonPoint::IsOnArc()const |
134 | { |
135 | return isonarc; |
136 | } |
137 | |
138 | |
139 | |
140 | |