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