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