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