32cc1d616ba4f18d6691a88ec5fb7ee78fd7dee7
[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 BOPInt,
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 BOPInt;  
91        
92     SetSectionAttribute(me:out; 
93         theSecAttr : SectionAttribute from BOPAlgo); 
94          
95     Perform(me:out) 
96       is redefined;   
97     --  
98     -- protected methods 
99     -- 
100     Clear(me:out) 
101       is virtual protected;  
102           
103     Init(me:out) 
104       is virtual protected;
105       
106     PerformVV(me:out) 
107       is virtual protected;   
108      
109     PerformVE(me:out) 
110       is virtual protected;  
111      
112     PerformVF(me:out) 
113       is virtual protected;  
114          
115     PerformEE(me:out) 
116       is virtual protected; 
117           
118     PerformEF(me:out) 
119       is virtual protected; 
120      
121     PerformFF(me:out) 
122       is virtual protected;
123      
124     
125     TreatVerticesEE(me:out) 
126       is protected; 
127
128     MakeSplitEdges(me:out) 
129       is protected;   
130         
131     MakeBlocks(me:out) 
132       is protected; 
133          
134     MakePCurves(me:out) 
135       is protected; 
136          
137     ProcessDE(me:out) 
138       is protected;  
139        
140     FillShrunkData(me:out; 
141         thePB:out PaveBlock from BOPDS) 
142       is protected;   
143  
144     FillShrunkData(me:out; 
145         theType1: ShapeEnum from TopAbs; 
146         theType2: ShapeEnum from TopAbs) 
147       is protected;      
148  
149     PerformVerticesEE(me:out; 
150         theMVCPB:out IndexedDataMapOfShapeCoupleOfPaveBlocks from BOPDS; 
151         theAllocator:out BaseAllocator from BOPCol) 
152       returns Integer from Standard 
153       is protected; 
154          
155     PerformVerticesEF(me:out; 
156         theMVCPB:out IndexedDataMapOfShapeCoupleOfPaveBlocks from BOPDS; 
157         theAllocator:out BaseAllocator from BOPCol) 
158       returns Integer from Standard 
159       is protected; 
160      
161     CheckFacePaves(me:out; 
162         theVnew:Vertex from TopoDS; 
163         theMIF:MapOfInteger from BOPCol) 
164       returns Boolean from Standard 
165       is protected;  
166           
167     CheckFacePaves(myclass; 
168         theN:Integer from Standard; 
169         theMIFOn:MapOfInteger from BOPCol; 
170         theMIFIn:MapOfInteger from BOPCol) 
171       returns Boolean from Standard 
172       is protected;  
173          
174     IsExistingVertex(me; 
175         theP:Pnt from gp; 
176         theTol:Real from Standard; 
177         theMVOn:MapOfInteger from BOPCol) 
178       returns Boolean from Standard 
179       is protected; 
180
181     PutPavesOnCurve(me:out; 
182         theMVOn   : MapOfInteger from BOPCol; 
183         theTolR3D : Real from Standard; 
184         theNC     : out Curve from BOPDS;  
185         nF1       : Integer from Standard; 
186         nF2       : Integer from Standard; 
187         theMI     : MapOfInteger from BOPCol; 
188         theMVEF   : MapOfInteger from BOPCol; 
189         theMVTol  : out DataMapOfIntegerReal from BOPCol) 
190       is protected;   
191     ---Purpose: 
192     -- Checks and puts paves from <theMVOn> on the curve <theNC>.
193
194     ExtendedTolerance(me:out; 
195         nV       : Integer from Standard; 
196         aMI      : MapOfInteger from BOPCol; 
197         aTolVExt : out Real from  Standard;
198         aType    : Integer from Standard = 0) 
199       returns Boolean from  Standard 
200       is protected; 
201     ---Purpose: 
202     -- Depending on the parameter aType it checks whether  
203     -- the vertex nV was created in EE or EF intersections. 
204     -- If so, it increases aTolVExt from tolerance value of vertex to  
205     -- the max distance from vertex nV to the ends of the range of common part. 
206     -- Possible values of aType: 
207     -- 1 - checks only EE; 
208     -- 2 - checks only EF;
209     -- other - checks both types of intersections.
210          
211     PutBoundPaveOnCurve(me:out;  
212         theF1: Face from TopoDS;  
213         theF2: Face from TopoDS;  
214         theTolR3D:Real from Standard; 
215         theNC:out Curve from BOPDS;  
216         theMVOnIn:out MapOfInteger from BOPCol;
217         theMVB:out MapOfInteger from BOPCol) 
218       is protected; 
219
220     IsExistingPaveBlock(me:out; 
221         thePB:PaveBlock from BOPDS;  
222         theNC:Curve from BOPDS;
223         theTolR3D:Real from Standard; 
224         theMPB:IndexedMapOfPaveBlock from BOPDS; 
225         thePBOut:out PaveBlock from BOPDS)
226       returns Boolean from Standard 
227       is protected;  
228  
229     IsExistingPaveBlock(me:out; 
230         thePB:PaveBlock from BOPDS;  
231         theNC:Curve from BOPDS;
232         theTolR3D:Real from Standard; 
233         theLSE:ListOfInteger from BOPCol) 
234       returns Boolean from Standard 
235       is protected;   
236      
237     PostTreatFF(me:out; 
238         theMSCPB:out IndexedDataMapOfShapeCoupleOfPaveBlocks from BOPDS; 
239         theMVI:out DataMapOfShapeInteger from BOPCol;  
240         theDMExEdges:out DataMapOfPaveBlockListOfPaveBlock from BOPDS; 
241         theDMI:out DataMapOfIntegerInteger from BOPCol;
242         theAllocator:out BaseAllocator from BOPCol) 
243       returns Integer from Standard 
244       is protected;  
245     ---Purpose: 
246     -- Treatment of section edges.
247     
248     --
249     --  Treatment of degenerated edges  
250     -- 
251     FindPaveBlocks(me:out;  
252         theV:Integer from Standard; 
253         theF:Integer from Standard; 
254         theLPB:out ListOfPaveBlock from BOPDS) 
255       is protected; 
256
257     FillPaves(me:out;  
258         theV:Integer from Standard; 
259         theE:Integer from Standard; 
260         theF:Integer from Standard; 
261         theLPB: ListOfPaveBlock from BOPDS; 
262         thePB: PaveBlock from BOPDS) 
263       is protected; 
264          
265     MakeSplitEdge(me:out;  
266         theV:Integer from Standard; 
267         theF:Integer from Standard) 
268       is protected;  
269          
270     GetEFPnts(me:out;
271         nF1 : Integer from Standard;
272         nF2 : Integer from Standard;
273         aListOfPnts: out ListOfPntOn2S from IntSurf)
274       is protected; 
275        
276     PutEFPavesOnCurve(me:out; 
277         theNC      : out Curve from BOPDS; 
278         theMI      : MapOfInteger from BOPCol;
279         theMVEF    : MapOfInteger from BOPCol;
280         theMVTol   : out DataMapOfIntegerReal from BOPCol)
281       is protected; 
282     ---Purpose: 
283     -- Checks and puts paves created in EF intersections on the curve <theNC>.
284  
285     PutStickPavesOnCurve(me:out; 
286         aF1        : Face from TopoDS; 
287         aF2        : Face from TopoDS;  
288         theMI      : MapOfInteger from BOPCol;
289         theNC      : out Curve from BOPDS; 
290         theMVStick : MapOfInteger from BOPCol; 
291         theMVTol   : out DataMapOfIntegerReal from BOPCol)
292       is protected;  
293     ---Purpose: 
294     -- Puts stick paves on the curve <theNC>
295  
296     GetStickVertices(me:out; 
297         nF1        : Integer from Standard; 
298         nF2        : Integer from Standard; 
299         theMVStick : out MapOfInteger from BOPCol;
300         theMVEF    : out MapOfInteger from BOPCol; 
301         theMI      : out MapOfInteger from BOPCol)
302       is protected;  
303     ---Purpose: 
304     -- Collects indices of vertices created in all intersections between 
305     -- two faces (<nF1> and <nF2>) to the map <theMVStick>. 
306     -- Also, it collects indices of EF vertices to the <theMVEF> map  
307     -- and indices of all subshapes of these two faces to the <theMI> map.
308  
309     GetFullShapeMap(me:out; 
310         nF    : Integer from Standard; 
311         theMI : out MapOfInteger from BOPCol) 
312       is protected; 
313     ---Purpose: 
314     -- Collects index nF and indices of all subshapes of the shape with index <nF>
315     -- to the map <theMI>. 
316     
317     RemoveUsedVertices(me:out; 
318         theNC : out Curve from BOPDS; 
319         theMV : out MapOfInteger from BOPCol)  
320       is protected; 
321     ---Purpose: 
322     -- Removes indices of vertices that are already on the
323     -- curve <theNC> from the map <theMV>.  
324     -- It is used in PutEFPavesOnCurve and PutStickPavesOnCurve methods.
325  
326     PutPaveOnCurve(me:out; 
327         nV        : Integer from Standard; 
328         theTolR3D : Real from Standard;
329         theNC     : out Curve from BOPDS; 
330         theMI     : MapOfInteger from BOPCol;
331         theMVTol  : out DataMapOfIntegerReal from BOPCol;
332         aType     : Integer from Standard = 0)
333       is protected; 
334     ---Purpose: 
335     -- Puts the pave nV on the curve theNC.  
336     -- Parameter aType defines whether to check the pave with 
337     -- extended tolerance: 
338     -- 0 - do not perform the check; 
339     -- other - perform the check (aType goes to ExtendedTolerance).
340  
341     ProcessExistingPaveBlocks(me:out; 
342         theInt     : Integer from Standard; 
343         theMPBOnIn : IndexedMapOfPaveBlock from BOPDS; 
344         theMSCPB   : out IndexedDataMapOfShapeCoupleOfPaveBlocks from BOPDS; 
345         theMVI     : out DataMapOfShapeInteger from BOPCol; 
346         theMVB     : MapOfInteger from BOPCol; 
347         theMPB     : out MapOfPaveBlock from BOPDS)
348       is  protected; 
349     ---Purpose:              
350     -- Adds the existing edges from the map <theMPBOnIn> which interfere  
351     -- with the vertices from <theMVB> map to the post treatment of section edges.
352  
353     UpdateExistingPaveBlocks(me:out; 
354         thePB   : PaveBlock from BOPDS;
355         theLPB  : out ListOfPaveBlock from BOPDS; 
356         nF1     : Integer from Standard; 
357         nF2     : Integer from Standard)
358       is protected; 
359     ---Purpose: 
360     -- Replaces existing pave block <thePB> with new pave blocks <theLPB>. 
361     -- The list <theLPB> contains images of <thePB> which were created in 
362     -- the post treatment of section edges.
363  
364     TreatNewVertices(me:out; 
365         theMVI    : IndexedDataMapOfShapeInteger from BOPCol; 
366         theImages : out IndexedDataMapOfShapeListOfShape from BOPCol) 
367       is protected; 
368     ---Purpose: 
369     -- Treatment of vertices that were created in EE intersections. 
370  
371     PutClosingPaveOnCurve (me:out; 
372         aNC :out Curve from BOPDS)  
373       is protected; 
374     ---Purpose: 
375     -- Put paves on the curve <aBC> in case when <aBC>   
376     -- is closed 3D-curve  
377      
378     PreparePostTreatFF(me:out; 
379         aInt   : Integer from Standard; 
380         aPB    : PaveBlock from BOPDS;  
381         aMSCPB : out IndexedDataMapOfShapeCoupleOfPaveBlocks from BOPDS; 
382         aMVI   : out DataMapOfShapeInteger from BOPCol; 
383         aVC    : out VectorOfCurve from BOPDS)
384       is protected; 
385     ---Purpose: 
386     -- Keeps data for post treatment 
387      
388     RefineFaceInfoOn(me:out) 
389       is protected; 
390     ---Purpose: 
391     -- Refines the state On for the all faces having 
392     -- state information 
393
394     UpdateFaceInfo(me:out;
395         theDME:out DataMapOfPaveBlockListOfPaveBlock from BOPDS) 
396       is protected; 
397     ---Purpose: 
398     -- Updates the information about faces
399      
400     ForceInterfVE(me:out; 
401         nV   : Integer from Standard; 
402         aPB  : out PaveBlock from BOPDS; 
403         aMPB : out MapOfPaveBlock from BOPDS) 
404       is protected;
405     ---Purpose: 
406     -- Updates tolerance of vertex with index <nV>  
407     -- to make it interfere with edge
408     
409     ForceInterfVF(me:out; 
410         nV : Integer from Standard; 
411         nF : Integer from Standard) 
412       returns Boolean from Standard
413       is protected;
414     ---Purpose: 
415     -- Updates tolerance of vertex with index <nV>  
416     -- to make it interfere with face with index <nF> 
417     
418     CheckPlanes(me; 
419         nF1 : Integer from Standard; 
420         nF2 : Integer from Standard)
421       returns Boolean from Standard 
422       is protected; 
423     ---Purpose: 
424     -- Checks if there are any common or intersecting sub shapes
425     -- between two planar faces.  
426      
427     SplitEdge(me:out; 
428         nE  : Integer from Standard; 
429         nV1 : Integer from Standard; 
430         aT1 : Real from Standard;
431         nV2 : Integer from Standard; 
432         aT2 : Real from Standard) 
433     returns Integer from Standard 
434     is protected;
435     ---Purpose: 
436     -- Creates new edge from the edge nE with vertices nV1 and nV2 
437     -- and returns the index of that new edge in the DS.
438  
439     UpdatePaveBlocks(me:out;  
440         theDMI : DataMapOfIntegerInteger from BOPCol) 
441     is protected; 
442     ---Purpose: 
443     -- Updates pave blocks which have the paves with indices contained  
444     -- in the map <theDMI>.
445         
446 fields  
447     myArguments   : ListOfShape from BOPCol is protected;  
448     myDS          : PDS from BOPDS is protected; 
449     myIterator    : PIterator from BOPDS is protected; 
450     myContext     : Context from BOPInt is protected;   
451     mySectionAttribute : SectionAttribute from BOPAlgo is protected;
452
453 end PaveFiller;