0024830: Remove redundant keyword 'mutable' in CDL declarations
[occt.git] / src / HLRBRep / HLRBRep_Data.cdl
1 -- Created on: 1993-01-11
2 -- Created by: Christophe MARION
3 -- Copyright (c) 1993-1999 Matra Datavision
4 -- Copyright (c) 1999-2014 OPEN CASCADE SAS
5 --
6 -- This file is part of Open CASCADE Technology software library.
7 --
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
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.
13 --
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
16
17 class Data from HLRBRep inherits TShared from MMgt
18
19 uses
20     Address           from Standard,
21     Integer           from Standard,
22     Boolean           from Standard,
23     ShortReal         from Standard,
24     Real              from Standard,
25     Array1OfInteger   from TColStd,
26     Pnt               from gp,
27     Pnt2d             from gp,
28     Dir2d             from gp,
29     CurveType         from GeomAbs,
30     SurfaceType       from GeomAbs,
31     State             from TopAbs,
32     Orientation       from TopAbs,
33     IndexedMapOfShape from TopTools,
34     IntersectionPoint from IntRes2d,
35     Interference      from HLRAlgo,
36     InterferenceList  from HLRAlgo,
37     Projector         from HLRAlgo,
38     EdgeData          from HLRBRep,
39     FaceData          from HLRBRep,
40     Array1OfEData     from HLRBRep,
41     Array1OfFData     from HLRBRep,
42     FaceIterator      from HLRBRep,
43     EdgeFaceTool      from HLRBRep,
44     Intersector       from HLRBRep,
45     Curve             from HLRBRep,
46     CLProps           from HLRBRep,
47     Surface           from HLRBRep,
48     SLProps           from HLRBRep,
49     TopolTool         from BRepTopAdaptor,
50     MapOfShapeTool    from BRepTopAdaptor
51     
52     
53 raises
54     UndefinedDerivative from StdFail
55
56 is
57     --
58     --       Method to load or edit the Data Structure
59     --       
60
61     Create(NV, NE, NF : Integer from Standard)
62         ---Purpose: Create an  empty data structure  of <NV> vertices,
63         --          <NE> edges and <NF> faces.
64     returns Data from HLRBRep;
65     
66     Write(me : mutable; DS       : Data    from HLRBRep;
67                         dv,de,df : Integer from Standard)
68         ---Purpose: Write <DS>    in   me  with   a     translation of
69         --          <dv>,<de>,<df>.
70     is static;
71     
72     EDataArray(me : mutable) returns Array1OfEData from HLRBRep
73         ---C++: inline
74         ---C++: return &
75     is static;
76
77     FDataArray(me : mutable) returns Array1OfFData from HLRBRep
78         ---C++: inline
79         ---C++: return &
80     is static;
81
82     Tolerance(me : mutable; tol : ShortReal from Standard)
83         ---C++: inline
84         ---Purpose: Set the  tolerance for the  rejections  during the
85         --          exploration
86     is static;
87     
88     Tolerance(me) returns ShortReal from Standard
89         ---C++: inline
90         ---Purpose: returns  the tolerance for the  rejections  during
91         --          the exploration
92     is static;
93     
94     Update(me : mutable; P : Projector from HLRAlgo)
95         ---Purpose: end of building  of the Data and updating
96         --          all the informations linked to the projection.
97     is static;
98     
99     Projector(me : mutable) returns Projector from HLRAlgo
100         ---C++: inline
101         ---C++: return &
102     is static;
103
104     --
105     --      Methods to query the Data
106     --      
107     
108     NbVertices(me) returns Integer from Standard
109         ---C++: inline
110     is static;
111
112     NbEdges(me) returns Integer from Standard
113         ---C++: inline
114     is static;
115
116     NbFaces(me) returns Integer from Standard
117         ---C++: inline
118     is static;
119
120     EdgeMap(me : mutable) returns IndexedMapOfShape from TopTools
121         ---C++: inline
122         ---C++: return &
123     is static;
124
125     FaceMap(me : mutable) returns IndexedMapOfShape from TopTools
126         ---C++: inline
127         ---C++: return &
128     is static;
129
130     --
131     --      Exploration of non rejected visible edges
132     --      
133
134     InitBoundSort(me        : mutable;
135                   MinMaxTot : Address from Standard;
136                   e1,e2     : Integer from Standard)
137         ---Purpose: to compare with only non rejected edges.
138     is static;
139     
140     InitEdge(me : mutable; FI :        Integer        from Standard;
141                            MST: in out MapOfShapeTool from BRepTopAdaptor)
142         ---Purpose: Begin an iteration only  on visible Edges
143         --          crossing the face number <FI>.
144     is static;
145     
146     MoreEdge(me : mutable) returns Boolean from Standard
147     is static;
148     
149     NextEdge(me : mutable; skip : Boolean from Standard = Standard_True)
150     is static;
151     
152     Edge(me) returns Integer from Standard
153         ---Purpose: Returns the  current Edge
154     is static;
155
156     HidingTheFace(me) returns Boolean from Standard
157         ---C++: inline
158         ---Purpose: Returns true if   the  current edge to   be hidden
159         --          belongs to the hiding face.
160     is static;
161     
162     SimpleHidingFace(me) returns Boolean from Standard
163         ---C++: inline
164         ---Purpose: Returns true if the current hiding face is not  an
165         --          auto-intersected one.
166     is static;
167     
168     --
169     --     Intersection of current edge with face
170     --     
171     
172     InitInterference(me : mutable)
173         ---Purpose: Intersect  the current  Edge  with the boundary of
174         --          the hiding  face.   The interferences are given by
175         --          the More, Next, and Value methods.
176     is static;
177     
178     MoreInterference(me) returns Boolean from Standard
179         ---C++: inline
180     is static;
181     
182     NextInterference(me : mutable)
183     is static;
184
185     RejectedInterference(me : mutable) returns Boolean from Standard
186         ---Purpose: Returns  True if the  interference is rejected.
187     is static;
188     
189     AboveInterference(me : mutable) returns Boolean from Standard
190         ---Purpose: Returns True if the rejected interference is above
191         --          the face.
192     is static;
193     
194     Interference(me : mutable) returns Interference from HLRAlgo
195         ---C++: inline
196         ---C++: return &
197     is static;
198     
199     LocalLEGeometry2D(me : mutable; Param :     Real    from Standard;
200                                     Tg    : out Dir2d   from gp;
201                                     Nm    : out Dir2d   from gp;
202                                     Cu    : out Real    from Standard)
203         ---Purpose: Returns the local description of the projection of
204         --          the current LEdge  at parameter  <Param>.
205     raises
206         UndefinedDerivative from StdFail
207     is static;
208
209     LocalFEGeometry2D(me : mutable; FE    :     Integer from Standard;
210                                     Param :     Real    from Standard;
211                                     Tg    : out Dir2d   from gp;
212                                     Nm    : out Dir2d   from gp;
213                                     Cu    : out Real    from Standard)
214         ---Purpose: Returns the local description of the projection of
215         --          the current FEdge  at parameter  <Param>.
216     raises
217         UndefinedDerivative from StdFail
218     is static;
219
220     EdgeState(me : mutable; p1,p2       :     Real  from Standard;
221                             stbef, staf : out State from TopAbs)
222         ---Purpose: Returns the local  3D   state of the  intersection
223         --          between the current edge and the current face at the
224         --          <p1> and <p2> parameters.
225     is static;
226     
227     EdgeOfTheHidingFace(me; E  : Integer  from Standard;
228                             ED : EdgeData from HLRBRep)
229     returns Boolean from Standard
230         ---Purpose: Returns the  true if the  Edge <ED> belongs to the
231         --          Hiding Face.
232         ---C++: inline
233    is static;
234
235     HidingStartLevel(me : mutable; E  : Integer          from Standard;
236                                    ED : EdgeData         from HLRBRep;
237                                    IL : InterferenceList from HLRAlgo)
238     returns Integer from Standard
239         ---Purpose: Returns the number of  levels of hiding face above
240         --          the   first  point  of   the    edge <ED>.     The
241         --          InterferenceList is  given to  compute far away of
242         --          the Interferences and then come back.
243     is static;
244
245     Compare(me : mutable; E  : Integer  from Standard;
246                           ED : EdgeData from HLRBRep)
247     returns State from TopAbs
248         ---Purpose: Returns   the  state   of  the   Edge  <ED>  after
249         --          classification.
250     is static;
251
252     SimplClassify(me : mutable; E         :     Integer  from Standard;
253                                 ED        :     EdgeData from HLRBRep;
254                                 Nbp       :     Integer  from Standard;
255                                 p1,  p2   :     Real     from Standard)
256     returns State from TopAbs; 
257         ---Purpose: Simple classification of part of edge  [p1,  p2] 
258         --  returns  OUT  if  at  least  1 of  Nbp  points  of  edge  is  out 
259         --  othewise  returns  IN 
260         --  It  is  used  to  check  "suspision"  hided  part  of  edge.
261     
262     -- The following methods are private
263
264     OrientOutLine(me : mutable; I  :     Integer  from Standard;
265                                 FD : out FaceData from HLRBRep)
266     returns Boolean from Standard
267         ---Purpose: Orient the   OutLines  ( left  must  be  inside in
268         --          projection ). Returns True if the face of a closed
269         --          shell has been inverted;
270     is static private;
271
272     OrientOthEdge(me : mutable; I  :     Integer  from Standard;
273                                 FD : out FaceData from HLRBRep)
274         ---Purpose: Orient the Edges which  are not  Internal OutLine,
275         --          not Double and not IsoLine.
276     is static private;
277
278     Classify(me : mutable; E         :     Integer  from Standard;
279                            ED        :     EdgeData from HLRBRep;
280                            LevelFlag :     Boolean  from Standard;
281                            Level     : out Integer  from Standard;
282                            param     :     Real     from Standard)
283     returns State from TopAbs;
284         ---Purpose: Classification of an edge.
285
286     RejectedPoint(me : mutable; PInter      : IntersectionPoint from IntRes2d;
287                                 BoundOri    : Orientation       from TopAbs;
288                                 NumSeg      : Integer           from Standard) --- -1 if Point else NumSegment 
289     returns Boolean from Standard
290         ---Purpose: Returns  True  if the  intersection is  rejected.
291     is static private;
292
293     SameVertex(me : mutable; head1,head2 : Boolean from Standard)
294     returns Boolean from Standard
295         ---Purpose: returns True  if there is a common  vertex between
296         --          myLE and myFE  dependig  on  <head1> and  <head2>.
297     is static private;
298     
299     Destroy(me: mutable);
300         ---C++: alias ~
301     
302     
303 fields
304
305     -- basic data : Vertices, Edges, Faces
306     myNbVertices  : Integer           from Standard;
307     myNbEdges     : Integer           from Standard;
308     myNbFaces     : Integer           from Standard;
309     myEMap        : IndexedMapOfShape from TopTools;
310     myFMap        : IndexedMapOfShape from TopTools;
311     myEData       : Array1OfEData     from HLRBRep;
312     myFData       : Array1OfFData     from HLRBRep;
313     myEdgeIndices : Array1OfInteger   from TColStd;
314     myToler       : ShortReal         from Standard;
315     myProj        : Projector         from HLRAlgo;
316     myLLProps     : CLProps           from HLRBRep;
317     myFLProps     : CLProps           from HLRBRep;
318     mySLProps     : SLProps           from HLRBRep;
319     myBigSize     : Real              from Standard;
320
321     -- Face exploration
322     myFaceItr1    : FaceIterator      from HLRBRep;
323     myFaceItr2    : FaceIterator      from HLRBRep;
324     
325     -- Current hiding face
326     iFace         : Integer           from Standard;
327     iFaceData     : Address           from Standard;
328     iFaceGeom     : Address           from Standard;
329     iFaceMinMax   : Address           from Standard;
330     iFaceType     : SurfaceType       from GeomAbs;
331     iFaceBack     : Boolean           from Standard;
332     iFaceSimp     : Boolean           from Standard;
333     iFaceSmpl     : Boolean           from Standard;
334     iFaceTest     : Boolean           from Standard;
335     
336     -- Exploration of edges to be hidden
337     myHideCount   : Integer           from Standard;
338     myDeca        : Real              from Standard[16];
339     mySurD        : Real              from Standard[16];
340     myCurSortEd   : Integer           from Standard;
341     myNbrSortEd   : Integer           from Standard;
342      
343     -- Current hidden edge, to be intersected
344     myLE          : Integer           from Standard;
345     myLEOutLine   : Boolean           from Standard;
346     myLEInternal  : Boolean           from Standard;
347     myLEDouble    : Boolean           from Standard;
348     myLEIsoLine   : Boolean           from Standard;
349     myLEData      : Address           from Standard;
350     myLEGeom      : Address           from Standard;
351     myLEMinMax    : Address           from Standard;
352     myLEType      : CurveType         from GeomAbs;
353     myLETol       : ShortReal         from Standard;
354
355     -- Exploration of hiding face for intersection
356     myFE          : Integer           from Standard;
357     myFEOri       : Orientation       from TopAbs;
358     myFEOutLine   : Boolean           from Standard;
359     myFEInternal  : Boolean           from Standard;
360     myFEDouble    : Boolean           from Standard;
361     myFEData      : Address           from Standard;
362     myFEGeom      : Address           from Standard;
363     myFEType      : CurveType         from GeomAbs;
364     myFETol       : ShortReal         from Standard;
365     
366     -- Intersections
367     myIntersector : Intersector       from HLRBRep;
368     myClassifier  : TopolTool         from BRepTopAdaptor;
369     mySameVertex  : Boolean           from Standard;
370     myIntersected : Boolean           from Standard;
371     myNbPoints    : Integer           from Standard;
372     myNbSegments  : Integer           from Standard;
373     iInterf       : Integer           from Standard;
374     myIntf        : Interference      from HLRAlgo;
375     myAboveIntf   : Boolean           from Standard;
376
377     myReject      : Address           from Standard; 
378      
379     
380 end Data;