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
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
|
-- File: HLRBRep_Data.cdl
-- Created: Mon Jan 11 13:58:26 1993
-- Author: Christophe MARION
-- <cma@sdsun1>
---Copyright: Matra Datavision 1993
class Data from HLRBRep inherits TShared from MMgt
uses
Address from Standard,
Integer from Standard,
Boolean from Standard,
ShortReal from Standard,
Real from Standard,
Array1OfInteger from TColStd,
Pnt from gp,
Pnt2d from gp,
Dir2d from gp,
CurveType from GeomAbs,
SurfaceType from GeomAbs,
State from TopAbs,
Orientation from TopAbs,
IndexedMapOfShape from TopTools,
IntersectionPoint from IntRes2d,
Interference from HLRAlgo,
InterferenceList from HLRAlgo,
Projector from HLRAlgo,
EdgeData from HLRBRep,
FaceData from HLRBRep,
Array1OfEData from HLRBRep,
Array1OfFData from HLRBRep,
FaceIterator from HLRBRep,
EdgeFaceTool from HLRBRep,
Intersector from HLRBRep,
Curve from HLRBRep,
CLProps from HLRBRep,
Surface from HLRBRep,
SLProps from HLRBRep,
TopolTool from BRepTopAdaptor,
MapOfShapeTool from BRepTopAdaptor
raises
UndefinedDerivative from StdFail
is
--
-- Method to load or edit the Data Structure
--
Create(NV, NE, NF : Integer from Standard)
---Purpose: Create an empty data structure of <NV> vertices,
-- <NE> edges and <NF> faces.
returns mutable Data from HLRBRep;
Write(me : mutable; DS : Data from HLRBRep;
dv,de,df : Integer from Standard)
---Purpose: Write <DS> in me with a translation of
-- <dv>,<de>,<df>.
is static;
EDataArray(me : mutable) returns Array1OfEData from HLRBRep
---C++: inline
---C++: return &
is static;
FDataArray(me : mutable) returns Array1OfFData from HLRBRep
---C++: inline
---C++: return &
is static;
Tolerance(me : mutable; tol : ShortReal from Standard)
---C++: inline
---Purpose: Set the tolerance for the rejections during the
-- exploration
is static;
Tolerance(me) returns ShortReal from Standard
---C++: inline
---Purpose: returns the tolerance for the rejections during
-- the exploration
is static;
Update(me : mutable; P : Projector from HLRAlgo)
---Purpose: end of building of the Data and updating
-- all the informations linked to the projection.
is static;
Projector(me : mutable) returns Projector from HLRAlgo
---C++: inline
---C++: return &
is static;
--
-- Methods to query the Data
--
NbVertices(me) returns Integer from Standard
---C++: inline
is static;
NbEdges(me) returns Integer from Standard
---C++: inline
is static;
NbFaces(me) returns Integer from Standard
---C++: inline
is static;
EdgeMap(me : mutable) returns IndexedMapOfShape from TopTools
---C++: inline
---C++: return &
is static;
FaceMap(me : mutable) returns IndexedMapOfShape from TopTools
---C++: inline
---C++: return &
is static;
--
-- Exploration of non rejected visible edges
--
InitBoundSort(me : mutable;
MinMaxTot : Address from Standard;
e1,e2 : Integer from Standard)
---Purpose: to compare with only non rejected edges.
is static;
InitEdge(me : mutable; FI : Integer from Standard;
MST: in out MapOfShapeTool from BRepTopAdaptor)
---Purpose: Begin an iteration only on visible Edges
-- crossing the face number <FI>.
is static;
MoreEdge(me : mutable) returns Boolean from Standard
is static;
NextEdge(me : mutable; skip : Boolean from Standard = Standard_True)
is static;
Edge(me) returns Integer from Standard
---Purpose: Returns the current Edge
is static;
HidingTheFace(me) returns Boolean from Standard
---C++: inline
---Purpose: Returns true if the current edge to be hidden
-- belongs to the hiding face.
is static;
SimpleHidingFace(me) returns Boolean from Standard
---C++: inline
---Purpose: Returns true if the current hiding face is not an
-- auto-intersected one.
is static;
--
-- Intersection of current edge with face
--
InitInterference(me : mutable)
---Purpose: Intersect the current Edge with the boundary of
-- the hiding face. The interferences are given by
-- the More, Next, and Value methods.
is static;
MoreInterference(me) returns Boolean from Standard
---C++: inline
is static;
NextInterference(me : mutable)
is static;
RejectedInterference(me : mutable) returns Boolean from Standard
---Purpose: Returns True if the interference is rejected.
is static;
AboveInterference(me : mutable) returns Boolean from Standard
---Purpose: Returns True if the rejected interference is above
-- the face.
is static;
Interference(me : mutable) returns Interference from HLRAlgo
---C++: inline
---C++: return &
is static;
LocalLEGeometry2D(me : mutable; Param : Real from Standard;
Tg : out Dir2d from gp;
Nm : out Dir2d from gp;
Cu : out Real from Standard)
---Purpose: Returns the local description of the projection of
-- the current LEdge at parameter <Param>.
raises
UndefinedDerivative from StdFail
is static;
LocalFEGeometry2D(me : mutable; FE : Integer from Standard;
Param : Real from Standard;
Tg : out Dir2d from gp;
Nm : out Dir2d from gp;
Cu : out Real from Standard)
---Purpose: Returns the local description of the projection of
-- the current FEdge at parameter <Param>.
raises
UndefinedDerivative from StdFail
is static;
EdgeState(me : mutable; p1,p2 : Real from Standard;
stbef, staf : out State from TopAbs)
---Purpose: Returns the local 3D state of the intersection
-- between the current edge and the current face at the
-- <p1> and <p2> parameters.
is static;
EdgeOfTheHidingFace(me; E : Integer from Standard;
EData : EdgeData from HLRBRep)
returns Boolean from Standard
---Purpose: Returns the true if the Edge <EData> belongs to the
-- Hiding Face.
---C++: inline
is static;
HidingStartLevel(me : mutable; E : Integer from Standard;
EData : EdgeData from HLRBRep;
IL : InterferenceList from HLRAlgo)
returns Integer from Standard
---Purpose: Returns the number of levels of hiding face above
-- the first point of the edge <EData>. The
-- InterferenceList is given to compute far away of
-- the Interferences and then come back.
is static;
Compare(me : mutable; E : Integer from Standard;
EData : EdgeData from HLRBRep)
returns State from TopAbs
---Purpose: Returns the state of the Edge <EData> after
-- classification.
is static;
SimplClassify(me : mutable; E : Integer from Standard;
EData : EdgeData from HLRBRep;
Nbp : Integer from Standard;
p1, p2 : Real from Standard)
returns State from TopAbs;
---Purpose: Simple classification of part of edge [p1, p2]
-- returns OUT if at least 1 of Nbp points of edge is out
-- othewise returns IN
-- It is used to check "suspision" hided part of edge.
-- The following methods are private
OrientOutLine(me : mutable; I : Integer from Standard;
FD : out FaceData from HLRBRep)
returns Boolean from Standard
---Purpose: Orient the OutLines ( left must be inside in
-- projection ). Returns True if the face of a closed
-- shell has been inverted;
is static private;
OrientOthEdge(me : mutable; I : Integer from Standard;
FD : out FaceData from HLRBRep)
---Purpose: Orient the Edges which are not Internal OutLine,
-- not Double and not IsoLine.
is static private;
Classify(me : mutable; E : Integer from Standard;
EData : EdgeData from HLRBRep;
LevelFlag : Boolean from Standard;
Level : out Integer from Standard;
param : Real from Standard)
returns State from TopAbs
---Purpose: Classification of an edge.
is static private;
RejectedPoint(me : mutable; PInter : IntersectionPoint from IntRes2d;
BoundOri : Orientation from TopAbs;
NumSeg : Integer from Standard) --- -1 if Point else NumSegment
returns Boolean from Standard
---Purpose: Returns True if the intersection is rejected.
is static private;
SameVertex(me : mutable; head1,head2 : Boolean from Standard)
returns Boolean from Standard
---Purpose: returns True if there is a common vertex between
-- myLE and myFE dependig on <head1> and <head2>.
is static private;
Destroy(me: mutable);
---C++: alias ~
fields
-- basic data : Vertices, Edges, Faces
myNbVertices : Integer from Standard;
myNbEdges : Integer from Standard;
myNbFaces : Integer from Standard;
myEMap : IndexedMapOfShape from TopTools;
myFMap : IndexedMapOfShape from TopTools;
myEData : Array1OfEData from HLRBRep;
myFData : Array1OfFData from HLRBRep;
myEdgeIndices : Array1OfInteger from TColStd;
myToler : ShortReal from Standard;
myProj : Projector from HLRAlgo;
myLLProps : CLProps from HLRBRep;
myFLProps : CLProps from HLRBRep;
mySLProps : SLProps from HLRBRep;
myBigSize : Real from Standard;
-- Face exploration
myFaceItr1 : FaceIterator from HLRBRep;
myFaceItr2 : FaceIterator from HLRBRep;
-- Current hiding face
iFace : Integer from Standard;
iFaceData : Address from Standard;
iFaceGeom : Address from Standard;
iFaceMinMax : Address from Standard;
iFaceType : SurfaceType from GeomAbs;
iFaceBack : Boolean from Standard;
iFaceSimp : Boolean from Standard;
iFaceSmpl : Boolean from Standard;
iFaceTest : Boolean from Standard;
-- Exploration of edges to be hidden
myHideCount : Integer from Standard;
myDeca : Real from Standard[16];
mySurD : Real from Standard[16];
myCurSortEd : Integer from Standard;
myNbrSortEd : Integer from Standard;
-- Current hidden edge, to be intersected
myLE : Integer from Standard;
myLEOutLine : Boolean from Standard;
myLEInternal : Boolean from Standard;
myLEDouble : Boolean from Standard;
myLEIsoLine : Boolean from Standard;
myLEData : Address from Standard;
myLEGeom : Address from Standard;
myLEMinMax : Address from Standard;
myLEType : CurveType from GeomAbs;
myLETol : ShortReal from Standard;
-- Exploration of hiding face for intersection
myFE : Integer from Standard;
myFEOri : Orientation from TopAbs;
myFEOutLine : Boolean from Standard;
myFEInternal : Boolean from Standard;
myFEDouble : Boolean from Standard;
myFEData : Address from Standard;
myFEGeom : Address from Standard;
myFEType : CurveType from GeomAbs;
myFETol : ShortReal from Standard;
-- Intersections
myIntersector : Intersector from HLRBRep;
myClassifier : TopolTool from BRepTopAdaptor;
mySameVertex : Boolean from Standard;
myIntersected : Boolean from Standard;
myNbPoints : Integer from Standard;
myNbSegments : Integer from Standard;
iInterf : Integer from Standard;
myIntf : Interference from HLRAlgo;
myAboveIntf : Boolean from Standard;
myReject : Address from Standard;
end Data;
|