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