0025164: BVH_Box::Area() might be called on uninitialized data
[occt.git] / src / BOPAlgo / BOPAlgo_PaveFiller.cdl
1 -- Created by: Peter KURNEV
2 -- Copyright (c) 2010-2014 OPEN CASCADE SAS
3 -- Copyright (c) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
4 -- Copyright (c) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT,
5 --                         EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 --
7 -- This file is part of Open CASCADE Technology software library.
8 --
9 -- This library is free software; you can redistribute it and/or modify it under
10 -- the terms of the GNU Lesser General Public License version 2.1 as published
11 -- by the Free Software Foundation, with special exception defined in the file
12 -- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
13 -- distribution for complete text of the license and disclaimer of any warranty.
14 --
15 -- Alternatively, this file may be used under the terms of Open CASCADE
16 -- commercial license or contractual agreement.
17
18 class PaveFiller from BOPAlgo 
19    inherits Algo from BOPAlgo 
20     ---Purpose: 
21
22 uses 
23     Pnt from gp,  
24     ShapeEnum from TopAbs,  
25     Vertex from TopoDS,
26     Face from TopoDS, 
27     Edge from TopoDS,
28      
29     BaseAllocator from BOPCol, 
30     ListOfShape from BOPCol, 
31     MapOfInteger from BOPCol, 
32     ListOfInteger from BOPCol, 
33     DataMapOfShapeInteger from BOPCol,   
34     IndexedDataMapOfShapeInteger from BOPCol,   
35     DataMapOfIntegerListOfInteger from BOPCol, 
36     DataMapOfShapeListOfShape from BOPCol,
37     IndexedDataMapOfShapeListOfShape from BOPCol, 
38     DataMapOfIntegerReal from BOPCol, 
39     DataMapOfIntegerInteger from BOPCol,
40     --  
41     Context from IntTools,
42     -- 
43     SectionAttribute from BOPAlgo, 
44     
45     DS  from BOPDS,
46     PDS from BOPDS, 
47     Iterator  from BOPDS, 
48     PIterator from BOPDS, 
49     PaveBlock from BOPDS, 
50     Curve from BOPDS,  
51     IndexedDataMapOfShapeCoupleOfPaveBlocks from BOPDS,
52     MapOfPaveBlock from BOPDS,  
53     IndexedMapOfPaveBlock from BOPDS,  
54     ListOfPaveBlock from BOPDS, 
55     ListOfPave from BOPDS, 
56     ListOfPntOn2S from IntSurf, 
57     Curve from IntTools,
58     
59     DataMapOfPaveBlockListOfPaveBlock from BOPDS, 
60     VectorOfCurve from BOPDS 
61      
62 --raises
63
64 is 
65     Create 
66       returns PaveFiller from BOPAlgo;  
67     ---C++: alias "Standard_EXPORT virtual ~BOPAlgo_PaveFiller();"
68      
69     Create (theAllocator: BaseAllocator from BOPCol) 
70       returns PaveFiller from BOPAlgo;   
71  
72     DS(me:out) 
73       returns DS from BOPDS; 
74     ---C++:return  const &   
75     
76       
77     PDS(me:out) 
78       returns PDS from BOPDS; 
79      
80     Iterator(me:out) 
81       returns PIterator from BOPDS;  
82     ---C++:return const & 
83      
84     Arguments(me) 
85       returns ListOfShape from BOPCol; 
86     ---C++: return const & 
87     ---C++: alias "Standard_EXPORT void SetArguments(const BOPCol_ListOfShape& theLS);" 
88
89     Context(me:out) 
90       returns Context from IntTools;  
91        
92     SetSectionAttribute(me:out; 
93         theSecAttr : SectionAttribute from BOPAlgo); 
94          
95     Perform(me:out) 
96       is redefined;   
97     --  
98     -- protected methods 
99     --  
100     PerformInternal (me:out) 
101       is virtual protected;   
102       
103     Clear(me:out) 
104       is virtual protected;  
105           
106     Init(me:out) 
107       is virtual protected;
108      
109     Prepare(me:out) 
110       is  protected;
111      
112     PerformVV(me:out) 
113       is virtual protected;   
114      
115     PerformVE(me:out) 
116       is virtual protected;  
117      
118     PerformVF(me:out) 
119       is virtual protected;  
120   
121     PerformEE(me:out) 
122       is virtual protected; 
123    
124     PerformEF(me:out) 
125       is virtual protected; 
126      
127     PerformFF(me:out) 
128       is virtual protected;
129      
130     
131     TreatVerticesEE(me:out) 
132       is protected; 
133
134     MakeSplitEdges(me:out) 
135       is protected;   
136         
137     MakeBlocks(me:out) 
138       is protected; 
139   
140     MakePCurves(me:out) 
141       is protected; 
142   
143     ProcessDE(me:out) 
144       is protected;  
145        
146     FillShrunkData(me:out; 
147         thePB:out PaveBlock from BOPDS) 
148       is protected;   
149  
150     FillShrunkData(me:out; 
151         theType1: ShapeEnum from TopAbs; 
152         theType2: ShapeEnum from TopAbs) 
153       is protected;   
154  
155     PerformVerticesEE(me:out; 
156         theMVCPB:out IndexedDataMapOfShapeCoupleOfPaveBlocks from BOPDS; 
157         theAllocator:out BaseAllocator from BOPCol) 
158       returns Integer from Standard 
159       is protected; 
160   
161     PerformVerticesEF(me:out; 
162         theMVCPB:out IndexedDataMapOfShapeCoupleOfPaveBlocks from BOPDS; 
163         theAllocator:out BaseAllocator from BOPCol) 
164       returns Integer from Standard 
165       is protected; 
166      
167     CheckFacePaves(me:out; 
168         theVnew:Vertex from TopoDS; 
169         theMIF:MapOfInteger from BOPCol) 
170       returns Boolean from Standard 
171       is protected;  
172    
173     CheckFacePaves(myclass; 
174         theN:Integer from Standard; 
175         theMIFOn:MapOfInteger from BOPCol; 
176         theMIFIn:MapOfInteger from BOPCol) 
177       returns Boolean from Standard 
178       is protected;  
179   
180     IsExistingVertex(me; 
181         theP:Pnt from gp; 
182         theTol:Real from Standard; 
183         theMVOn:MapOfInteger from BOPCol) 
184       returns Boolean from Standard 
185       is protected; 
186
187     PutPavesOnCurve(me:out; 
188         theMVOn   : MapOfInteger from BOPCol; 
189         theTolR3D : Real from Standard; 
190         theNC     : out Curve from BOPDS;  
191         nF1       : Integer from Standard; 
192         nF2       : Integer from Standard; 
193         theMI     : MapOfInteger from BOPCol; 
194         theMVEF   : MapOfInteger from BOPCol; 
195         theMVTol  : out DataMapOfIntegerReal from BOPCol) 
196       is protected;   
197     ---Purpose: 
198     -- Checks and puts paves from <theMVOn> on the curve <theNC>.
199
200     ExtendedTolerance(me:out; 
201         nV       : Integer from Standard; 
202         aMI      : MapOfInteger from BOPCol; 
203         aTolVExt : out Real from  Standard;
204         aType    : Integer from Standard = 0) 
205       returns Boolean from  Standard 
206       is protected; 
207     ---Purpose: 
208     -- Depending on the parameter aType it checks whether  
209     -- the vertex nV was created in EE or EF intersections. 
210     -- If so, it increases aTolVExt from tolerance value of vertex to  
211     -- the max distance from vertex nV to the ends of the range of common part. 
212     -- Possible values of aType: 
213     -- 1 - checks only EE; 
214     -- 2 - checks only EF;
215     -- other - checks both types of intersections.
216   
217     PutBoundPaveOnCurve(me:out;  
218         theF1: Face from TopoDS;  
219         theF2: Face from TopoDS;  
220         theTolR3D:Real from Standard; 
221         theNC:out Curve from BOPDS;  
222         theMVB:out MapOfInteger from BOPCol) 
223       is protected; 
224
225     IsExistingPaveBlock(me:out; 
226         thePB:PaveBlock from BOPDS;  
227         theNC:Curve from BOPDS;
228         theTolR3D:Real from Standard; 
229         theMPB:IndexedMapOfPaveBlock from BOPDS; 
230         thePBOut:out PaveBlock from BOPDS)
231       returns Boolean from Standard 
232       is protected;  
233  
234     IsExistingPaveBlock(me:out; 
235         thePB:PaveBlock from BOPDS;  
236         theNC:Curve from BOPDS;
237         theTolR3D:Real from Standard; 
238         theLSE:ListOfInteger from BOPCol) 
239       returns Boolean from Standard 
240       is protected;   
241      
242     PostTreatFF(me:out; 
243         theMSCPB:out IndexedDataMapOfShapeCoupleOfPaveBlocks from BOPDS; 
244         theMVI:out DataMapOfShapeInteger from BOPCol;  
245         theDMExEdges:out DataMapOfPaveBlockListOfPaveBlock from BOPDS; 
246         theDMI:out DataMapOfIntegerInteger from BOPCol;
247         theAllocator:out BaseAllocator from BOPCol) 
248       returns Integer from Standard 
249       is protected;  
250     ---Purpose: 
251     -- Treatment of section edges.
252     
253     --
254     --  Treatment of degenerated edges  
255     -- 
256     FindPaveBlocks(me:out;  
257         theV:Integer from Standard; 
258         theF:Integer from Standard; 
259         theLPB:out ListOfPaveBlock from BOPDS) 
260       is protected; 
261
262     FillPaves(me:out;  
263         theV:Integer from Standard; 
264         theE:Integer from Standard; 
265         theF:Integer from Standard; 
266         theLPB: ListOfPaveBlock from BOPDS; 
267         thePB: PaveBlock from BOPDS) 
268       is protected; 
269   
270     MakeSplitEdge(me:out;  
271         theV:Integer from Standard; 
272         theF:Integer from Standard) 
273       is protected;  
274       
275     GetEFPnts(me:out;
276         nF1 : Integer from Standard;
277         nF2 : Integer from Standard;
278         aListOfPnts: out ListOfPntOn2S from IntSurf)
279       is protected; 
280        
281     PutEFPavesOnCurve(me:out; 
282         theNC      : out Curve from BOPDS; 
283         theMI      : MapOfInteger from BOPCol;
284         theMVEF    : MapOfInteger from BOPCol;
285         theMVTol   : out DataMapOfIntegerReal from BOPCol)
286       is protected; 
287     ---Purpose: 
288     -- Checks and puts paves created in EF intersections on the curve <theNC>.
289  
290     PutStickPavesOnCurve(me:out; 
291         aF1        : Face from TopoDS; 
292         aF2        : Face from TopoDS;  
293         theMI      : MapOfInteger from BOPCol;
294         theNC      : out Curve from BOPDS; 
295         theMVStick : MapOfInteger from BOPCol; 
296         theMVTol   : out DataMapOfIntegerReal from BOPCol)
297       is protected;  
298     ---Purpose: 
299     -- Puts stick paves on the curve <theNC>
300  
301     GetStickVertices(me:out; 
302         nF1        : Integer from Standard; 
303         nF2        : Integer from Standard; 
304         theMVStick : out MapOfInteger from BOPCol;
305         theMVEF    : out MapOfInteger from BOPCol; 
306         theMI      : out MapOfInteger from BOPCol)
307       is protected;  
308     ---Purpose: 
309     -- Collects indices of vertices created in all intersections between 
310     -- two faces (<nF1> and <nF2>) to the map <theMVStick>. 
311     -- Also, it collects indices of EF vertices to the <theMVEF> map  
312     -- and indices of all subshapes of these two faces to the <theMI> map.
313  
314     GetFullShapeMap(me:out; 
315         nF    : Integer from Standard; 
316         theMI : out MapOfInteger from BOPCol) 
317       is protected; 
318     ---Purpose: 
319     -- Collects index nF and indices of all subshapes of the shape with index <nF>
320     -- to the map <theMI>. 
321     
322     RemoveUsedVertices(me:out; 
323         theNC : out Curve from BOPDS; 
324         theMV : out MapOfInteger from BOPCol)  
325       is protected; 
326     ---Purpose: 
327     -- Removes indices of vertices that are already on the
328     -- curve <theNC> from the map <theMV>.  
329     -- It is used in PutEFPavesOnCurve and PutStickPavesOnCurve methods.
330  
331     PutPaveOnCurve(me:out; 
332         nV        : Integer from Standard; 
333         theTolR3D : Real from Standard;
334         theNC     : out Curve from BOPDS; 
335         theMI     : MapOfInteger from BOPCol;
336         theMVTol  : out DataMapOfIntegerReal from BOPCol;
337         aType     : Integer from Standard = 0)
338       is protected; 
339     ---Purpose: 
340     -- Puts the pave nV on the curve theNC.  
341     -- Parameter aType defines whether to check the pave with 
342     -- extended tolerance: 
343     -- 0 - do not perform the check; 
344     -- other - perform the check (aType goes to ExtendedTolerance).
345  
346     ProcessExistingPaveBlocks(me:out; 
347         theInt     : Integer from Standard; 
348         theMPBOnIn : IndexedMapOfPaveBlock from BOPDS; 
349         theMSCPB   : out IndexedDataMapOfShapeCoupleOfPaveBlocks from BOPDS; 
350         theMVI     : out DataMapOfShapeInteger from BOPCol; 
351         theMVB     : MapOfInteger from BOPCol; 
352         theMPB     : out MapOfPaveBlock from BOPDS)
353       is  protected; 
354     ---Purpose:       
355     -- Adds the existing edges from the map <theMPBOnIn> which interfere  
356     -- with the vertices from <theMVB> map to the post treatment of section edges.
357  
358     UpdateExistingPaveBlocks(me:out; 
359         thePB   : PaveBlock from BOPDS;
360         theLPB  : out ListOfPaveBlock from BOPDS; 
361         nF1     : Integer from Standard; 
362         nF2     : Integer from Standard)
363       is protected; 
364     ---Purpose: 
365     -- Replaces existing pave block <thePB> with new pave blocks <theLPB>. 
366     -- The list <theLPB> contains images of <thePB> which were created in 
367     -- the post treatment of section edges.
368  
369     TreatNewVertices(me:out; 
370         theMVI    : IndexedDataMapOfShapeInteger from BOPCol; 
371         theImages : out IndexedDataMapOfShapeListOfShape from BOPCol) 
372       is protected; 
373     ---Purpose: 
374     -- Treatment of vertices that were created in EE intersections. 
375  
376     PutClosingPaveOnCurve (me:out; 
377         aNC :out Curve from BOPDS)  
378       is protected; 
379     ---Purpose: 
380     -- Put paves on the curve <aBC> in case when <aBC>   
381     -- is closed 3D-curve  
382      
383     PreparePostTreatFF(me:out; 
384         aInt   : Integer from Standard; 
385         aPB    : PaveBlock from BOPDS;  
386         aMSCPB : out IndexedDataMapOfShapeCoupleOfPaveBlocks from BOPDS; 
387         aMVI   : out DataMapOfShapeInteger from BOPCol; 
388         aVC    : out VectorOfCurve from BOPDS)
389       is protected; 
390     ---Purpose: 
391     -- Keeps data for post treatment 
392      
393     RefineFaceInfoOn(me:out) 
394       is protected; 
395     ---Purpose: 
396     -- Refines the state On for the all faces having 
397     -- state information 
398
399     UpdateFaceInfo(me:out;
400         theDME:out DataMapOfPaveBlockListOfPaveBlock from BOPDS) 
401       is protected; 
402     ---Purpose: 
403     -- Updates the information about faces
404      
405     ForceInterfVE(me:out; 
406         nV   : Integer from Standard; 
407         aPB  : out PaveBlock from BOPDS; 
408         aMPB : out MapOfPaveBlock from BOPDS) 
409       is protected;
410     ---Purpose: 
411     -- Updates tolerance of vertex with index <nV>  
412     -- to make it interfere with edge
413     
414     ForceInterfVF(me:out; 
415         nV : Integer from Standard; 
416         nF : Integer from Standard) 
417       returns Boolean from Standard
418       is protected;
419     ---Purpose: 
420     -- Updates tolerance of vertex with index <nV>  
421     -- to make it interfere with face with index <nF> 
422     
423     CheckPlanes(me; 
424         nF1 : Integer from Standard; 
425         nF2 : Integer from Standard)
426       returns Boolean from Standard 
427       is protected; 
428     ---Purpose: 
429     -- Checks if there are any common or intersecting sub shapes
430     -- between two planar faces.  
431      
432     SplitEdge(me:out; 
433         nE  : Integer from Standard; 
434         nV1 : Integer from Standard; 
435         aT1 : Real from Standard;
436         nV2 : Integer from Standard; 
437         aT2 : Real from Standard) 
438     returns Integer from Standard 
439     is protected;
440     ---Purpose: 
441     -- Creates new edge from the edge nE with vertices nV1 and nV2 
442     -- and returns the index of that new edge in the DS.
443  
444     UpdatePaveBlocks(me:out;  
445         theDMI : DataMapOfIntegerInteger from BOPCol) 
446     is protected; 
447     ---Purpose: 
448     -- Updates pave blocks which have the paves with indices contained  
449     -- in the map <theDMI>.
450         
451 fields  
452     myArguments   : ListOfShape from BOPCol is protected;  
453     myDS          : PDS from BOPDS is protected; 
454     myIterator    : PIterator from BOPDS is protected; 
455     myContext     : Context from IntTools is protected;   
456     mySectionAttribute : SectionAttribute from BOPAlgo is protected;
457
458 end PaveFiller;