blob: c9351272dc7f620a7a764e72131c756a0d0e516d (
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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
|
// File: TopoDS_TShape.lxx
// Created: Wed Mar 27 14:37:33 1991
// Author: Remi LEQUETTE
#include <TopAbs.hxx>
#include <TopoDS_Shape.hxx>
#include <TopoDS_ListIteratorOfListOfShape.hxx>
// The Convex method can conflict with Convex defined as an integer
// in X.h
#ifdef Convex
#undef Convex
#endif
// Defined mask values
#define TopoDS_TShape_Flags_Free (1<<0)
#define TopoDS_TShape_Flags_Modified (1<<1)
#define TopoDS_TShape_Flags_Checked (1<<2)
#define TopoDS_TShape_Flags_Orientable (1<<3)
#define TopoDS_TShape_Flags_Closed (1<<4)
#define TopoDS_TShape_Flags_Infinite (1<<5)
#define TopoDS_TShape_Flags_Convex (1<<6)
//=======================================================================
//function : TopoDS_TShape
//purpose : Constructor, Empty TShape
//=======================================================================
inline TopoDS_TShape::TopoDS_TShape()
: myFlags(TopoDS_TShape_Flags_Free |
TopoDS_TShape_Flags_Modified |
TopoDS_TShape_Flags_Orientable)
{
}
//=======================================================================
//function : Free
//purpose :
//=======================================================================
inline Standard_Boolean TopoDS_TShape::Free() const
{
return ((myFlags & TopoDS_TShape_Flags_Free) != 0);
}
//=======================================================================
//function : Free
//purpose :
//=======================================================================
inline void TopoDS_TShape::Free(const Standard_Boolean F)
{
if (F) myFlags |= TopoDS_TShape_Flags_Free;
else myFlags &= ~TopoDS_TShape_Flags_Free;
}
//=======================================================================
//function : Modified
//purpose :
//=======================================================================
inline Standard_Boolean TopoDS_TShape::Modified() const
{
return ((myFlags & TopoDS_TShape_Flags_Modified) != 0);
}
//=======================================================================
//function : Modified
//purpose :
//=======================================================================
inline void TopoDS_TShape::Modified(const Standard_Boolean M)
{
if (M)
{
myFlags |= TopoDS_TShape_Flags_Modified;
// When a TShape is modified it is also unchecked
myFlags &= ~TopoDS_TShape_Flags_Checked;
}
else myFlags &= ~TopoDS_TShape_Flags_Modified;
}
//=======================================================================
//function : Checked
//purpose :
//=======================================================================
inline Standard_Boolean TopoDS_TShape::Checked() const
{
return ((myFlags & TopoDS_TShape_Flags_Checked) != 0);
}
//=======================================================================
//function : Checked
//purpose :
//=======================================================================
inline void TopoDS_TShape::Checked(const Standard_Boolean M)
{
if (M) myFlags |= TopoDS_TShape_Flags_Checked;
else myFlags &= ~TopoDS_TShape_Flags_Checked;
}
//=======================================================================
//function : Orientable
//purpose :
//=======================================================================
inline Standard_Boolean TopoDS_TShape::Orientable() const
{
return ((myFlags & TopoDS_TShape_Flags_Orientable) != 0);
}
//=======================================================================
//function : Orientable
//purpose :
//=======================================================================
inline void TopoDS_TShape::Orientable(const Standard_Boolean M)
{
if (M) myFlags |= TopoDS_TShape_Flags_Orientable;
else myFlags &= ~TopoDS_TShape_Flags_Orientable;
}
//=======================================================================
//function : Closed
//purpose :
//=======================================================================
inline Standard_Boolean TopoDS_TShape::Closed() const
{
return ((myFlags & TopoDS_TShape_Flags_Closed) != 0);
}
//=======================================================================
//function : Closed
//purpose :
//=======================================================================
inline void TopoDS_TShape::Closed(const Standard_Boolean M)
{
if (M) myFlags |= TopoDS_TShape_Flags_Closed;
else myFlags &= ~TopoDS_TShape_Flags_Closed;
}
//=======================================================================
//function : Infinite
//purpose :
//=======================================================================
inline Standard_Boolean TopoDS_TShape::Infinite() const
{
return ((myFlags & TopoDS_TShape_Flags_Infinite) != 0);
}
//=======================================================================
//function : Infinite
//purpose :
//=======================================================================
inline void TopoDS_TShape::Infinite(const Standard_Boolean M)
{
if (M) myFlags |= TopoDS_TShape_Flags_Infinite;
else myFlags &= ~TopoDS_TShape_Flags_Infinite;
}
//=======================================================================
//function : Convex
//purpose :
//=======================================================================
inline Standard_Boolean TopoDS_TShape::Convex() const
{
return ((myFlags & TopoDS_TShape_Flags_Convex) != 0);
}
//=======================================================================
//function : Convex
//purpose :
//=======================================================================
inline void TopoDS_TShape::Convex(const Standard_Boolean M)
{
if (M) myFlags |= TopoDS_TShape_Flags_Convex;
else myFlags &= ~TopoDS_TShape_Flags_Convex;
}
//=======================================================================
//function : Shapes
//purpose :
//=======================================================================
inline const TopoDS_ListOfShape& TopoDS_TShape::Shapes() const
{
return myShapes;
}
//=======================================================================
//function : ChangeShapes
//purpose :
//=======================================================================
inline TopoDS_ListOfShape& TopoDS_TShape::ChangeShapes()
{
return myShapes;
}
|