0023948: Wrong intersection between a surface of revolution and a plane.
[occt.git] / src / HLRBRep / HLRBRep_EdgeData.lxx
CommitLineData
b311480e 1// Created on: 1997-04-17
2// Created by: Christophe MARION
3// Copyright (c) 1997-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//
d5f74e42 8// This library is free software; you can redistribute it and/or modify it under
9// the terms of the GNU Lesser General Public License version 2.1 as published
973c2be1 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#define EMaskSelected ((Standard_Boolean)1)
18#define EMaskUsed ((Standard_Boolean)2)
19#define EMaskRg1Line ((Standard_Boolean)4)
20#define EMaskVertical ((Standard_Boolean)8)
21#define EMaskSimple ((Standard_Boolean)16)
22#define EMaskOutLVSta ((Standard_Boolean)32)
23#define EMaskOutLVEnd ((Standard_Boolean)64)
24#define EMaskIntDone ((Standard_Boolean)128)
25#define EMaskCutAtSta ((Standard_Boolean)256)
26#define EMaskCutAtEnd ((Standard_Boolean)512)
27#define EMaskVerAtSta ((Standard_Boolean)1024)
28#define EMaskVerAtEnd ((Standard_Boolean)2048)
29#define EMaskRgNLine ((Standard_Boolean)4096)
30
31//=======================================================================
32//function : Selected
33//purpose :
34//=======================================================================
35
36inline Standard_Boolean HLRBRep_EdgeData::Selected () const
37{ return (myFlags & EMaskSelected) != 0; }
38
39//=======================================================================
40//function : Selected
41//purpose :
42//=======================================================================
43
44inline void HLRBRep_EdgeData::Selected (const Standard_Boolean B)
45{
46 if (B) myFlags |= EMaskSelected;
47 else myFlags &= ~EMaskSelected;
48}
49
50//=======================================================================
51//function : Rg1Line
52//purpose :
53//=======================================================================
54
55inline Standard_Boolean HLRBRep_EdgeData::Rg1Line () const
56{ return (myFlags & EMaskRg1Line) != 0; }
57
58//=======================================================================
59//function : Rg1Line
60//purpose :
61//=======================================================================
62
63inline void HLRBRep_EdgeData::Rg1Line (const Standard_Boolean B)
64{
65 if (B) myFlags |= EMaskRg1Line;
66 else myFlags &= ~EMaskRg1Line;
67}
68
69//=======================================================================
70//function : RgNLine
71//purpose :
72//=======================================================================
73
74inline Standard_Boolean HLRBRep_EdgeData::RgNLine () const
75{ return (myFlags & EMaskRgNLine) != 0; }
76
77//=======================================================================
78//function : RgNLine
79//purpose :
80//=======================================================================
81
82inline void HLRBRep_EdgeData::RgNLine (const Standard_Boolean B)
83{
84 if (B) myFlags |= EMaskRgNLine;
85 else myFlags &= ~EMaskRgNLine;
86}
87
88//=======================================================================
89//function : Vertical
90//purpose :
91//=======================================================================
92
93inline Standard_Boolean HLRBRep_EdgeData::Vertical () const
94{ return (myFlags & EMaskVertical) != 0; }
95
96//=======================================================================
97//function : Vertical
98//purpose :
99//=======================================================================
100
101inline void HLRBRep_EdgeData::Vertical(const Standard_Boolean B)
102{
103 if (B) myFlags |= EMaskVertical;
104 else myFlags &= ~EMaskVertical;
105}
106
107//=======================================================================
108//function : Simple
109//purpose :
110//=======================================================================
111
112inline Standard_Boolean HLRBRep_EdgeData::Simple () const
113{ return (myFlags & EMaskSimple) != 0; }
114
115//=======================================================================
116//function : Simple
117//purpose :
118//=======================================================================
119
120inline void HLRBRep_EdgeData::Simple (const Standard_Boolean B)
121{
122 if (B) myFlags |= EMaskSimple;
123 else myFlags &= ~EMaskSimple;
124}
125
126//=======================================================================
127//function : OutLVSta
128//purpose :
129//=======================================================================
130
131inline Standard_Boolean HLRBRep_EdgeData::OutLVSta () const
132{ return (myFlags & EMaskOutLVSta) != 0; }
133
134//=======================================================================
135//function : OutLVSta
136//purpose :
137//=======================================================================
138
139inline void HLRBRep_EdgeData::OutLVSta (const Standard_Boolean B)
140{
141 if (B) myFlags |= EMaskOutLVSta;
142 else myFlags &= ~EMaskOutLVSta;
143}
144
145//=======================================================================
146//function : OutLVEnd
147//purpose :
148//=======================================================================
149
150inline Standard_Boolean HLRBRep_EdgeData::OutLVEnd () const
151{ return (myFlags & EMaskOutLVEnd) != 0; }
152
153//=======================================================================
154//function : OutLVEnd
155//purpose :
156//=======================================================================
157
158inline void HLRBRep_EdgeData::OutLVEnd (const Standard_Boolean B)
159{
160 if (B) myFlags |= EMaskOutLVEnd;
161 else myFlags &= ~EMaskOutLVEnd;
162}
163
164//=======================================================================
165//function : CutAtSta
166//purpose :
167//=======================================================================
168
169inline Standard_Boolean HLRBRep_EdgeData::CutAtSta () const
170{ return (myFlags & EMaskCutAtSta) != 0; }
171
172//=======================================================================
173//function : CutAtSta
174//purpose :
175//=======================================================================
176
177inline void HLRBRep_EdgeData::CutAtSta (const Standard_Boolean B)
178{
179 if (B) myFlags |= EMaskCutAtSta;
180 else myFlags &= ~EMaskCutAtSta;
181}
182
183//=======================================================================
184//function : CutAtEnd
185//purpose :
186//=======================================================================
187
188inline Standard_Boolean HLRBRep_EdgeData::CutAtEnd () const
189{ return (myFlags & EMaskCutAtEnd) != 0; }
190
191//=======================================================================
192//function : CutAtEnd
193//purpose :
194//=======================================================================
195
196inline void HLRBRep_EdgeData::CutAtEnd (const Standard_Boolean B)
197{
198 if (B) myFlags |= EMaskCutAtEnd;
199 else myFlags &= ~EMaskCutAtEnd;
200}
201
202//=======================================================================
203//function : VerAtSta
204//purpose :
205//=======================================================================
206
207inline Standard_Boolean HLRBRep_EdgeData::VerAtSta () const
208{ return (myFlags & EMaskVerAtSta) != 0; }
209
210//=======================================================================
211//function : VerAtSta
212//purpose :
213//=======================================================================
214
215inline void HLRBRep_EdgeData::VerAtSta (const Standard_Boolean B)
216{
217 if (B) myFlags |= EMaskVerAtSta;
218 else myFlags &= ~EMaskVerAtSta;
219}
220
221//=======================================================================
222//function : VerAtEnd
223//purpose :
224//=======================================================================
225
226inline Standard_Boolean HLRBRep_EdgeData::VerAtEnd () const
227{ return (myFlags & EMaskVerAtEnd) != 0; }
228
229//=======================================================================
230//function : VerAtEnd
231//purpose :
232//=======================================================================
233
234inline void HLRBRep_EdgeData::VerAtEnd (const Standard_Boolean B)
235{
236 if (B) myFlags |= EMaskVerAtEnd;
237 else myFlags &= ~EMaskVerAtEnd;
238}
239
240//=======================================================================
241//function : AutoIntersectionDone
242//purpose :
243//=======================================================================
244
245inline Standard_Boolean HLRBRep_EdgeData::AutoIntersectionDone () const
246{ return (myFlags & EMaskIntDone) != 0; }
247
248//=======================================================================
249//function : AutoIntersectionDone
250//purpose :
251//=======================================================================
252
253inline void
254HLRBRep_EdgeData::AutoIntersectionDone (const Standard_Boolean B)
255{
256 if (B) myFlags |= EMaskIntDone;
257 else myFlags &= ~EMaskIntDone;
258}
259
260//=======================================================================
261//function : Used
262//purpose :
263//=======================================================================
264
265inline Standard_Boolean HLRBRep_EdgeData::Used () const
266{ return (myFlags & EMaskUsed) != 0; }
267
268//=======================================================================
269//function : Used
270//purpose :
271//=======================================================================
272
273inline void HLRBRep_EdgeData::Used (const Standard_Boolean B)
274{
275 if (B) myFlags |= EMaskUsed;
276 else myFlags &= ~EMaskUsed;
277}
278
279//=======================================================================
280//function : HideCount
281//purpose :
282//=======================================================================
283
284inline Standard_Integer HLRBRep_EdgeData::HideCount () const
285{ return myHideCount; }
286
287//=======================================================================
288//function : HideCount
289//purpose :
290//=======================================================================
291
292inline void HLRBRep_EdgeData::HideCount (const Standard_Integer I)
293{ myHideCount = I; }
294
295//=======================================================================
296//function : VSta
297//purpose :
298//=======================================================================
299
300inline Standard_Integer HLRBRep_EdgeData::VSta() const
301{ return myVSta; }
302
303//=======================================================================
304//function : VSta
305//purpose :
306//=======================================================================
307
308inline void HLRBRep_EdgeData::VSta (const Standard_Integer I)
309{ myVSta = I; }
310
311//=======================================================================
312//function : VEnd
313//purpose :
314//=======================================================================
315
316inline Standard_Integer HLRBRep_EdgeData::VEnd () const
317{ return myVEnd; }
318
319//=======================================================================
320//function : VEnd
321//purpose :
322//=======================================================================
323
324inline void HLRBRep_EdgeData::VEnd (const Standard_Integer I)
325{ myVEnd = I; }
326
327//=======================================================================
328//function : MinMax
329//purpose :
330//=======================================================================
331
332inline Standard_Address HLRBRep_EdgeData::MinMax () const
333{ return (Standard_Address)&myMinMax; }
334
335//=======================================================================
336//function : Status
337//purpose :
338//=======================================================================
339
340inline HLRAlgo_EdgeStatus & HLRBRep_EdgeData::Status ()
341{ return myStatus; }
342
343//=======================================================================
344//function : ChangeGeometry
345//purpose :
346//=======================================================================
347
348inline HLRBRep_Curve & HLRBRep_EdgeData::ChangeGeometry ()
349{ return myGeometry; }
350
351//=======================================================================
352//function : Geometry
353//purpose :
354//=======================================================================
355
356inline const HLRBRep_Curve & HLRBRep_EdgeData::Geometry () const
357{ return myGeometry; }
358
359//=======================================================================
360//function : Curve
361//purpose :
362//=======================================================================
363
364inline Standard_Address HLRBRep_EdgeData::Curve ()
365{ return ((Standard_Address)&myGeometry); }
366
367//=======================================================================
368//function : Tolerance
369//purpose :
370//=======================================================================
371
372inline Standard_ShortReal HLRBRep_EdgeData::Tolerance () const
373{ return myTolerance; }