0023948: Wrong intersection between a surface of revolution and a plane.
[occt.git] / src / HLRBRep / HLRBRep_FaceData.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 EMaskOrient ((Standard_Boolean)15)
18#define FMaskSelected ((Standard_Boolean)16)
19#define FMaskBack ((Standard_Boolean)32)
20#define FMaskSide ((Standard_Boolean)64)
21#define FMaskClosed ((Standard_Boolean)128)
22#define FMaskHiding ((Standard_Boolean)256)
23#define FMaskSimple ((Standard_Boolean)512)
24#define FMaskCut ((Standard_Boolean)1024)
25#define FMaskWithOutL ((Standard_Boolean)2048)
26#define FMaskPlane ((Standard_Boolean)4096)
27#define FMaskCylinder ((Standard_Boolean)8192)
28#define FMaskCone ((Standard_Boolean)16384)
29#define FMaskSphere ((Standard_Boolean)32768)
30#define FMaskTorus ((Standard_Boolean)65536)
31
32//=======================================================================
33//function : Selected
34//purpose :
35//=======================================================================
36
37inline Standard_Boolean HLRBRep_FaceData::Selected() const
38{ return (myFlags & FMaskSelected) != 0; }
39
40//=======================================================================
41//function : Selected
42//purpose :
43//=======================================================================
44
45inline void HLRBRep_FaceData::Selected(const Standard_Boolean B)
46{
47 if (B) myFlags |= FMaskSelected;
48 else myFlags &= ~FMaskSelected;
49}
50
51//=======================================================================
52//function : Back
53//purpose :
54//=======================================================================
55
56inline Standard_Boolean HLRBRep_FaceData::Back() const
57{ return (myFlags & FMaskBack) != 0; }
58
59//=======================================================================
60//function : Back
61//purpose :
62//=======================================================================
63
64inline void HLRBRep_FaceData::Back(const Standard_Boolean B)
65{
66 if (B) myFlags |= FMaskBack;
67 else myFlags &= ~FMaskBack;
68}
69
70//=======================================================================
71//function : Side
72//purpose :
73//=======================================================================
74
75inline Standard_Boolean HLRBRep_FaceData::Side() const
76{ return (myFlags & FMaskSide) != 0; }
77
78//=======================================================================
79//function : Side
80//purpose :
81//=======================================================================
82
83inline void HLRBRep_FaceData::Side(const Standard_Boolean B)
84{
85 if (B) myFlags |= FMaskSide;
86 else myFlags &= ~FMaskSide;
87}
88
89//=======================================================================
90//function : Closed
91//purpose :
92//=======================================================================
93
94inline Standard_Boolean HLRBRep_FaceData::Closed() const
95{ return (myFlags & FMaskClosed) != 0; }
96
97//=======================================================================
98//function : Closed
99//purpose :
100//=======================================================================
101
102inline void HLRBRep_FaceData::Closed(const Standard_Boolean B)
103{
104 if (B) myFlags |= FMaskClosed;
105 else myFlags &= ~FMaskClosed;
106}
107
108//=======================================================================
109//function : Hiding
110//purpose :
111//=======================================================================
112
113inline Standard_Boolean HLRBRep_FaceData::Hiding() const
114{ return (myFlags & FMaskHiding) != 0; }
115
116//=======================================================================
117//function : Hiding
118//purpose :
119//=======================================================================
120
121inline void HLRBRep_FaceData::Hiding(const Standard_Boolean B)
122{
123 if (B) myFlags |= FMaskHiding;
124 else myFlags &= ~FMaskHiding;
125}
126
127//=======================================================================
128//function : Simple
129//purpose :
130//=======================================================================
131
132inline Standard_Boolean HLRBRep_FaceData::Simple() const
133{ return (myFlags & FMaskSimple) != 0; }
134
135//=======================================================================
136//function : Simple
137//purpose :
138//=======================================================================
139
140inline void HLRBRep_FaceData::Simple(const Standard_Boolean B)
141{
142 if (B) myFlags |= FMaskSimple;
143 else myFlags &= ~FMaskSimple;
144}
145
146//=======================================================================
147//function : Cut
148//purpose :
149//=======================================================================
150
151inline Standard_Boolean HLRBRep_FaceData::Cut() const
152{ return (myFlags & FMaskCut) != 0; }
153
154//=======================================================================
155//function : Cut
156//purpose :
157//=======================================================================
158
159inline void HLRBRep_FaceData::Cut(const Standard_Boolean B)
160{
161 if (B) myFlags |= FMaskCut;
162 else myFlags &= ~FMaskCut;
163}
164
165//=======================================================================
166//function : WithOutL
167//purpose :
168//=======================================================================
169
170inline Standard_Boolean HLRBRep_FaceData::WithOutL() const
171{ return (myFlags & FMaskWithOutL) != 0; }
172
173//=======================================================================
174//function : WithOutL
175//purpose :
176//=======================================================================
177
178inline void HLRBRep_FaceData::WithOutL(const Standard_Boolean B)
179{
180 if (B) myFlags |= FMaskWithOutL;
181 else myFlags &= ~FMaskWithOutL;
182}
183
184//=======================================================================
185//function : Plane
186//purpose :
187//=======================================================================
188
189inline Standard_Boolean HLRBRep_FaceData::Plane() const
190{ return (myFlags & FMaskPlane) != 0; }
191
192//=======================================================================
193//function : Plane
194//purpose :
195//=======================================================================
196
197inline void HLRBRep_FaceData::Plane(const Standard_Boolean B)
198{
199 if (B) myFlags |= FMaskPlane;
200 else myFlags &= ~FMaskPlane;
201}
202
203//=======================================================================
204//function : Cylinder
205//purpose :
206//=======================================================================
207
208inline Standard_Boolean HLRBRep_FaceData::Cylinder() const
209{ return (myFlags & FMaskCylinder) != 0; }
210
211//=======================================================================
212//function : Cylinder
213//purpose :
214//=======================================================================
215
216inline void HLRBRep_FaceData::Cylinder(const Standard_Boolean B)
217{
218 if (B) myFlags |= FMaskCylinder;
219 else myFlags &= ~FMaskCylinder;
220}
221
222//=======================================================================
223//function : Cone
224//purpose :
225//=======================================================================
226
227inline Standard_Boolean HLRBRep_FaceData::Cone() const
228{ return (myFlags & FMaskCone) != 0; }
229
230//=======================================================================
231//function : Cone
232//purpose :
233//=======================================================================
234
235inline void HLRBRep_FaceData::Cone(const Standard_Boolean B)
236{
237 if (B) myFlags |= FMaskCone;
238 else myFlags &= ~FMaskCone;
239}
240
241//=======================================================================
242//function : Sphere
243//purpose :
244//=======================================================================
245
246inline Standard_Boolean HLRBRep_FaceData::Sphere() const
247{ return (myFlags & FMaskSphere) != 0; }
248
249//=======================================================================
250//function : Sphere
251//purpose :
252//=======================================================================
253
254inline void HLRBRep_FaceData::Sphere(const Standard_Boolean B)
255{
256 if (B) myFlags |= FMaskSphere;
257 else myFlags &= ~FMaskSphere;
258}
259
260//=======================================================================
261//function : Torus
262//purpose :
263//=======================================================================
264
265inline Standard_Boolean HLRBRep_FaceData::Torus() const
266{ return (myFlags & FMaskTorus) != 0; }
267
268//=======================================================================
269//function : Torus
270//purpose :
271//=======================================================================
272
273inline void HLRBRep_FaceData::Torus(const Standard_Boolean B)
274{
275 if (B) myFlags |= FMaskTorus;
276 else myFlags &= ~FMaskTorus;
277}
278
279//=======================================================================
280//function : Size
281//purpose :
282//=======================================================================
283
284inline Standard_Real HLRBRep_FaceData::Size() const
285{ return mySize; }
286
287//=======================================================================
288//function : Size
289//purpose :
290//=======================================================================
291
292inline void HLRBRep_FaceData::Size(const Standard_Real S)
293{ mySize = S; }
294
295//=======================================================================
296//function : Orientation
297//purpose :
298//=======================================================================
299
300inline TopAbs_Orientation HLRBRep_FaceData::Orientation() const
301{ return ((TopAbs_Orientation)(myFlags & EMaskOrient)); }
302
303//=======================================================================
304//function : Orientation
305//purpose :
306//=======================================================================
307
308inline void HLRBRep_FaceData::Orientation(const TopAbs_Orientation O)
309{
310 myFlags &= ~EMaskOrient;
311 myFlags |= (((Standard_Boolean)O) & EMaskOrient);
312}
313
314//=======================================================================
315//function : Wires
316//purpose :
317//=======================================================================
318
319inline Handle(HLRAlgo_WiresBlock)& HLRBRep_FaceData::Wires()
320{ return myWires; }
321
322//=======================================================================
323//function : Geometry
324//purpose :
325//=======================================================================
326
327inline HLRBRep_Surface& HLRBRep_FaceData::Geometry()
328{ return myGeometry; }
329
330//=======================================================================
331//function : Tolerance
332//purpose :
333//=======================================================================
334
335inline Standard_ShortReal HLRBRep_FaceData::Tolerance () const
336{ return myTolerance; }