545718e558b0e027387c7674e441b885853fd0d6
[occt.git] / src / BOPAlgo / BOPAlgo_PaveFiller.hxx
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 #ifndef _BOPAlgo_PaveFiller_HeaderFile
19 #define _BOPAlgo_PaveFiller_HeaderFile
20
21 #include <Standard.hxx>
22 #include <Standard_DefineAlloc.hxx>
23 #include <Standard_Handle.hxx>
24
25 #include <BOPCol_ListOfShape.hxx>
26 #include <BOPDS_PDS.hxx>
27 #include <BOPDS_PIterator.hxx>
28 #include <BOPAlgo_SectionAttribute.hxx>
29 #include <Standard_Real.hxx>
30 #include <BOPAlgo_Algo.hxx>
31 #include <BOPCol_BaseAllocator.hxx>
32 #include <TopAbs_ShapeEnum.hxx>
33 #include <Standard_Integer.hxx>
34 #include <BOPDS_IndexedDataMapOfShapeCoupleOfPaveBlocks.hxx>
35 #include <Standard_Boolean.hxx>
36 #include <BOPCol_IndexedMapOfShape.hxx>
37 #include <BOPCol_MapOfInteger.hxx>
38 #include <BOPCol_DataMapOfIntegerReal.hxx>
39 #include <BOPCol_ListOfInteger.hxx>
40 #include <BOPDS_IndexedMapOfPaveBlock.hxx>
41 #include <BOPCol_DataMapOfShapeInteger.hxx>
42 #include <BOPDS_DataMapOfPaveBlockListOfPaveBlock.hxx>
43 #include <BOPCol_DataMapOfIntegerInteger.hxx>
44 #include <BOPDS_ListOfPaveBlock.hxx>
45 #include <IntSurf_ListOfPntOn2S.hxx>
46 #include <BOPCol_DataMapOfIntegerListOfInteger.hxx>
47 #include <BOPDS_MapOfPaveBlock.hxx>
48 #include <BOPDS_MapOfPair.hxx>
49 #include <BOPDS_VectorOfCurve.hxx>
50 #include <BOPDS_IndexedDataMapOfPaveBlockListOfInteger.hxx>
51 #include <BOPCol_IndexedDataMapOfShapeInteger.hxx>
52 #include <BOPCol_IndexedDataMapOfShapeListOfShape.hxx>
53 #include <BOPAlgo_GlueEnum.hxx>
54 #include <IntTools_ShrunkRange.hxx>
55 class IntTools_Context;
56 class BOPDS_DS;
57 class BOPAlgo_SectionAttribute;
58 class BOPDS_PaveBlock;
59 class BOPDS_CommonBlock;
60 class gp_Pnt;
61 class BOPDS_Curve;
62 class TopoDS_Vertex;
63 class TopoDS_Edge;
64 class TopoDS_Face;
65
66 //!
67 //! The class represents the Intersection phase of the
68 //! Boolean Operations algorithm.<br>
69 //! It performs the pairwise intersection of the sub-shapes of
70 //! the arguments in the following order:<br>
71 //! 1. Vertex/Vertex;<br>
72 //! 2. Vertex/Edge;<br>
73 //! 3. Edge/Edge;<br>
74 //! 4. Vertex/Face;<br>
75 //! 5. Edge/Face;<br>
76 //! 6. Face/Face.<br>
77 //!
78 //! The results of intersection are stored into the Data Structure
79 //! of the algorithm.<br>
80 //!
81 //! Additionally to the options provided by the parent class,
82 //! the algorithm has the following options:<br>
83 //! - *Section attributes* - allows to customize the intersection of the faces
84 //!                          (avoid approximation or building 2d curves);<br>
85 //! - *Safe processing mode* - allows to avoid modification of the input
86 //!                            shapes during the operation (by default it is off);<br>
87 //! - *Gluing options* - allows to speed up the calculation on the special
88 //!                      cases, in which some sub-shapes are coincide.<br>
89 //!
90 //! The algorithm returns the following Warning statuses:
91 //! - *BOPAlgo_AlertSelfInterferingShape* - in case some of the argument shapes are self-interfering shapes;
92 //! - *BOPAlgo_AlertTooSmallEdge* - in case some edges of the input shapes have no valid range;
93 //! - *BOPAlgo_AlertNotSplittableEdge* - in case some edges of the input shapes has such a small
94 //!                                      valid range so it cannot be split;
95 //! - *BOPAlgo_AlertBadPositioning* - in case the positioning of the input shapes leads to creation
96 //!                                   of small edges;
97 //! - *BOPAlgo_AlertIntersectionOfPairOfShapesFailed* - in case intersection of some of the
98 //!                                                     sub-shapes has failed;
99 //! - *BOPAlgo_AlertAcquiredSelfIntersection* - in case some sub-shapes of the argument become connected
100 //!                                             through other shapes;
101 //! - *BOPAlgo_AlertBuildingPCurveFailed* - in case building 2D curve for some of the edges
102 //!                                         on the faces has failed.
103 //!
104 //! The algorithm returns the following Error alerts:
105 //! - *BOPAlgo_AlertTooFewArguments* - in case there are no enough arguments to
106 //!                      perform the operation;<br>
107 //! - *BOPAlgo_AlertIntersectionFailed* - in case some unexpected error occurred;<br>
108 //! - *BOPAlgo_AlertNullInputShapes* - in case some of the arguments are null shapes.<br>
109 //!
110 class BOPAlgo_PaveFiller  : public BOPAlgo_Algo
111 {
112 public:
113
114   DEFINE_STANDARD_ALLOC
115
116   
117   Standard_EXPORT BOPAlgo_PaveFiller();
118
119   Standard_EXPORT virtual ~BOPAlgo_PaveFiller();
120   
121   Standard_EXPORT BOPAlgo_PaveFiller(const BOPCol_BaseAllocator& theAllocator);
122   
123   Standard_EXPORT const BOPDS_DS& DS();
124   
125   Standard_EXPORT BOPDS_PDS PDS();
126   
127   Standard_EXPORT const BOPDS_PIterator& Iterator();
128   
129   Standard_EXPORT void SetArguments (const BOPCol_ListOfShape& theLS);
130   
131   Standard_EXPORT const BOPCol_ListOfShape& Arguments() const;
132   
133   Standard_EXPORT const Handle(IntTools_Context)& Context();
134   
135   Standard_EXPORT void SetSectionAttribute (const BOPAlgo_SectionAttribute& theSecAttr);
136   
137   //! Sets the flag that defines the mode of treatment.
138   //! In non-destructive mode the argument shapes are not modified. Instead
139   //! a copy of a sub-shape is created in the result if it is needed to be updated.
140   Standard_EXPORT void SetNonDestructive(const Standard_Boolean theFlag);
141   
142   //! Returns the flag that defines the mode of treatment.
143   //! In non-destructive mode the argument shapes are not modified. Instead
144   //! a copy of a sub-shape is created in the result if it is needed to be updated.
145   Standard_EXPORT Standard_Boolean NonDestructive() const;
146
147   Standard_EXPORT virtual void Perform() Standard_OVERRIDE;
148   
149   
150
151   //! Sets the glue option for the algorithm
152   Standard_EXPORT void SetGlue(const BOPAlgo_GlueEnum theGlue);
153   
154   //! Returns the glue option of the algorithm
155   Standard_EXPORT BOPAlgo_GlueEnum Glue() const;
156
157   //! Sets the flag to avoid building of p-curves of edges on faces
158   void SetAvoidBuildPCurve(const Standard_Boolean theValue)
159   {
160     myAvoidBuildPCurve = theValue;
161   }
162
163   //! Returns the flag to avoid building of p-curves of edges on faces
164   Standard_Boolean IsAvoidBuildPCurve() const
165   {
166     return myAvoidBuildPCurve;
167   }
168
169 protected:
170
171   typedef NCollection_DataMap
172             <Handle(BOPDS_PaveBlock),
173              Bnd_Box,
174              TColStd_MapTransientHasher> BOPAlgo_DataMapOfPaveBlockBndBox;
175
176
177   //! Sets non-destructive mode automatically if an argument 
178   //! contains a locked sub-shape (see TopoDS_Shape::Locked()).
179   Standard_EXPORT void SetNonDestructive();
180      
181   Standard_EXPORT void SetIsPrimary(const Standard_Boolean theFlag);
182    
183   Standard_EXPORT Standard_Boolean IsPrimary() const;
184
185   Standard_EXPORT virtual void PerformInternal();
186   
187   Standard_EXPORT virtual void Clear() Standard_OVERRIDE;
188   
189   Standard_EXPORT virtual void Init();
190   
191   Standard_EXPORT void Prepare();
192   
193   Standard_EXPORT virtual void PerformVV();
194   
195   Standard_EXPORT virtual void PerformVE();
196
197   //! Performs the intersection of the vertices with edges.
198   Standard_EXPORT void IntersectVE(const BOPDS_IndexedDataMapOfPaveBlockListOfInteger& theVEPairs,
199                                    const Standard_Boolean bAddInterfs = Standard_True);
200
201   //! Splits the Pave Blocks of the given edges with the extra paves.<br>
202   //! The method also builds the shrunk data for the new pave blocks and
203   //! in case there is no valid range on the pave block, the vertices of
204   //! this pave block will be united making SD vertex.<br>
205   //! Parameter <theAddInterfs> defines whether this interference will be added
206   //! into common table of interferences or not.<br>
207   //! If some of the Pave Blocks are forming the Common Blocks, the splits
208   //! of the Pave Blocks will also form a Common Block.
209   Standard_EXPORT void SplitPaveBlocks(const BOPCol_MapOfInteger& theMEdges,
210                                        const Standard_Boolean theAddInterfs);
211   
212   Standard_EXPORT virtual void PerformVF();
213   
214   Standard_EXPORT virtual void PerformEE();
215   
216   Standard_EXPORT virtual void PerformEF();
217   
218   Standard_EXPORT virtual void PerformFF();
219   
220   Standard_EXPORT void TreatVerticesEE();
221   
222   Standard_EXPORT void MakeSDVerticesFF(const BOPCol_DataMapOfIntegerListOfInteger& aDMVLV,
223                                         BOPCol_DataMapOfIntegerInteger& theDMNewSD);
224
225   Standard_EXPORT void MakeSplitEdges();
226   
227   Standard_EXPORT void MakeBlocks();
228   
229   Standard_EXPORT void MakePCurves();
230
231   Standard_EXPORT Standard_Integer MakeSDVertices(const BOPCol_ListOfInteger& theVertIndices,
232                                                   const Standard_Boolean theAddInterfs = 1);
233   
234   Standard_EXPORT void ProcessDE();
235   
236   Standard_EXPORT void FillShrunkData (Handle(BOPDS_PaveBlock)& thePB);
237   
238   Standard_EXPORT void FillShrunkData (const TopAbs_ShapeEnum theType1, const TopAbs_ShapeEnum theType2);
239
240   //! Analyzes the results of computation of the valid range for the
241   //! pave block and in case of error adds the warning status, otherwise
242   //! saves the valid range in the pave block.
243   Standard_EXPORT void AnalyzeShrunkData(const Handle(BOPDS_PaveBlock)& thePB,
244                                          const IntTools_ShrunkRange& theSR);
245
246   //! Performs intersection of new vertices, obtained in E/E and E/F intersections
247   Standard_EXPORT void PerformNewVertices(BOPDS_IndexedDataMapOfShapeCoupleOfPaveBlocks& theMVCPB,
248                                           const BOPCol_BaseAllocator& theAllocator,
249                                           const Standard_Boolean theIsEEIntersection = Standard_True);
250   
251   Standard_EXPORT Standard_Boolean CheckFacePaves (const TopoDS_Vertex& theVnew, const BOPCol_MapOfInteger& theMIF);
252   
253   Standard_EXPORT static Standard_Boolean CheckFacePaves (const Standard_Integer theN, const BOPCol_MapOfInteger& theMIFOn, const BOPCol_MapOfInteger& theMIFIn);
254   
255   Standard_EXPORT Standard_Boolean IsExistingVertex (const gp_Pnt& theP, const Standard_Real theTol, const BOPCol_MapOfInteger& theMVOn) const;
256   
257
258   //! Checks and puts paves from <theMVOn> on the curve <theNC>.
259   Standard_EXPORT void PutPavesOnCurve (const BOPCol_MapOfInteger& theMVOn, 
260                                 BOPDS_Curve& theNC, 
261                                 const Standard_Integer nF1, 
262                                 const Standard_Integer nF2, 
263                                 const BOPCol_MapOfInteger& theMI, 
264                                 const BOPCol_MapOfInteger& theMVEF, 
265                                 BOPCol_DataMapOfIntegerReal& theMVTol,
266                                 BOPCol_DataMapOfIntegerListOfInteger& aDMVLV);
267
268   Standard_EXPORT void FilterPavesOnCurves(const BOPDS_VectorOfCurve& theVNC);
269
270   //! Depending on the parameter aType it checks whether
271   //! the vertex nV was created in EE or EF intersections.
272   //! If so, it increases aTolVExt from tolerance value of vertex to
273   //! the max distance from vertex nV to the ends of the range of common part.
274   //! Possible values of aType:
275   //! 1 - checks only EE;
276   //! 2 - checks only EF;
277   //! other - checks both types of intersections.
278   Standard_EXPORT Standard_Boolean ExtendedTolerance (const Standard_Integer nV, const BOPCol_MapOfInteger& aMI, Standard_Real& aTolVExt, const Standard_Integer aType = 0);
279   
280   Standard_EXPORT void PutBoundPaveOnCurve(const TopoDS_Face& theF1,
281                                            const TopoDS_Face& theF2,
282                                            BOPDS_Curve& theNC,
283                                            BOPCol_ListOfInteger& theLBV);
284   
285   Standard_EXPORT Standard_Boolean IsExistingPaveBlock
286     (const Handle(BOPDS_PaveBlock)& thePB, const BOPDS_Curve& theNC,
287      const Standard_Real theTolR3D, const BOPDS_IndexedMapOfPaveBlock& theMPB,
288      const BOPDS_MapOfPaveBlock& theMPBCommon,
289      Handle(BOPDS_PaveBlock)& thePBOut, Standard_Real& theTolNew);
290   
291   Standard_EXPORT Standard_Boolean IsExistingPaveBlock (const Handle(BOPDS_PaveBlock)& thePB, const BOPDS_Curve& theNC, const BOPCol_ListOfInteger& theLSE);
292   
293
294   //! Treatment of section edges.
295   Standard_EXPORT void PostTreatFF (BOPDS_IndexedDataMapOfShapeCoupleOfPaveBlocks& theMSCPB,
296                                     BOPDS_DataMapOfPaveBlockListOfPaveBlock& theDMExEdges,
297                                     BOPCol_DataMapOfIntegerInteger& theDMNewSD,
298                                     const BOPCol_IndexedMapOfShape& theMicroEdges,
299                                     const BOPCol_IndexedMapOfShape& theVertsOnRejectedPB,
300                                     const BOPCol_BaseAllocator& theAllocator);
301   
302   Standard_EXPORT void FindPaveBlocks (const Standard_Integer theV, const Standard_Integer theF, BOPDS_ListOfPaveBlock& theLPB);
303   
304   Standard_EXPORT void FillPaves (const Standard_Integer theV, const Standard_Integer theE, const Standard_Integer theF, const BOPDS_ListOfPaveBlock& theLPB, const Handle(BOPDS_PaveBlock)& thePB);
305   
306   Standard_EXPORT void MakeSplitEdge (const Standard_Integer theV, const Standard_Integer theF);
307   
308   Standard_EXPORT void GetEFPnts (const Standard_Integer nF1, const Standard_Integer nF2, IntSurf_ListOfPntOn2S& aListOfPnts);
309   
310
311   //! Checks and puts paves created in EF intersections on the curve <theNC>.
312   Standard_EXPORT void PutEFPavesOnCurve (BOPDS_Curve& theNC, 
313                                 const BOPCol_MapOfInteger& theMI, 
314                                 const BOPCol_MapOfInteger& theMVEF, 
315                                 BOPCol_DataMapOfIntegerReal& theMVTol,
316                                 BOPCol_DataMapOfIntegerListOfInteger& aDMVLV);
317   
318
319   //! Puts stick paves on the curve <theNC>
320   Standard_EXPORT void PutStickPavesOnCurve (const TopoDS_Face& aF1, 
321                                 const TopoDS_Face& aF2, 
322                                 const BOPCol_MapOfInteger& theMI, 
323                                 BOPDS_Curve& theNC, 
324                                 const BOPCol_MapOfInteger& theMVStick, 
325                                 BOPCol_DataMapOfIntegerReal& theMVTol,
326                                 BOPCol_DataMapOfIntegerListOfInteger& aDMVLV);
327   
328
329   //! Collects indices of vertices created in all intersections between
330   //! two faces (<nF1> and <nF2>) to the map <theMVStick>.
331   //! Also, it collects indices of EF vertices to the <theMVEF> map
332   //! and indices of all subshapes of these two faces to the <theMI> map.
333   Standard_EXPORT void GetStickVertices (const Standard_Integer nF1, const Standard_Integer nF2, BOPCol_MapOfInteger& theMVStick, BOPCol_MapOfInteger& theMVEF, BOPCol_MapOfInteger& theMI);
334   
335
336   //! Collects index nF and indices of all subshapes of the shape with index <nF>
337   //! to the map <theMI>.
338   Standard_EXPORT void GetFullShapeMap (const Standard_Integer nF, BOPCol_MapOfInteger& theMI);
339   
340
341   //! Removes indices of vertices that are already on the
342   //! curve <theNC> from the map <theMV>.
343   //! It is used in PutEFPavesOnCurve and PutStickPavesOnCurve methods.
344   Standard_EXPORT void RemoveUsedVertices (BOPDS_Curve& theNC, BOPCol_MapOfInteger& theMV);
345   
346
347   //! Puts the pave nV on the curve theNC.
348   //! Parameter aType defines whether to check the pave with
349   //! extended tolerance:
350   //! 0 - do not perform the check;
351   //! other - perform the check (aType goes to ExtendedTolerance).
352   Standard_EXPORT void PutPaveOnCurve (const Standard_Integer nV, 
353                                 const Standard_Real theTolR3D, 
354                                 const BOPDS_Curve& theNC, 
355                                 const BOPCol_MapOfInteger& theMI, 
356                                 BOPCol_DataMapOfIntegerReal& theMVTol,
357                                 BOPCol_DataMapOfIntegerListOfInteger& aDMVLV,
358                                 const Standard_Integer aType = 0);
359   
360
361   //! Adds the existing edges from the map <theMPBOnIn> which interfere
362   //! with the vertices from <theMVB> map to the post treatment of section edges.
363   Standard_EXPORT void ProcessExistingPaveBlocks (const Standard_Integer theInt, const BOPDS_IndexedMapOfPaveBlock& theMPBOnIn, const BOPCol_DataMapOfIntegerListOfInteger& theDMBV, BOPDS_IndexedDataMapOfShapeCoupleOfPaveBlocks& theMSCPB, BOPCol_DataMapOfShapeInteger& theMVI, BOPDS_MapOfPaveBlock& theMPB);
364   
365
366   //! Replaces existing pave block <thePB> with new pave blocks <theLPB>.
367   //! The list <theLPB> contains images of <thePB> which were created in
368   //! the post treatment of section edges.
369   Standard_EXPORT void UpdateExistingPaveBlocks (const Handle(BOPDS_PaveBlock)& thePB, BOPDS_ListOfPaveBlock& theLPB, const Standard_Integer nF1, const Standard_Integer nF2);
370   
371
372   //! Treatment of vertices that were created in EE intersections.
373   Standard_EXPORT void TreatNewVertices(const BOPDS_IndexedDataMapOfShapeCoupleOfPaveBlocks& theMVCPB, BOPCol_IndexedDataMapOfShapeListOfShape& theImages);
374   
375
376   //! Put paves on the curve <aBC> in case when <aBC>
377   //! is closed 3D-curve
378   Standard_EXPORT void PutClosingPaveOnCurve (BOPDS_Curve& aNC);
379   
380
381   //! Keeps data for post treatment
382   Standard_EXPORT void PreparePostTreatFF (const Standard_Integer aInt, const Standard_Integer aCur, const Handle(BOPDS_PaveBlock)& aPB, BOPDS_IndexedDataMapOfShapeCoupleOfPaveBlocks& aMSCPB, BOPCol_DataMapOfShapeInteger& aMVI, BOPDS_ListOfPaveBlock& aLPB);
383
384   //! Updates the information about faces
385   Standard_EXPORT void UpdateFaceInfo (BOPDS_DataMapOfPaveBlockListOfPaveBlock& theDME, const BOPCol_DataMapOfIntegerInteger& theDMV);
386   
387
388   //! Updates tolerance of vertex with index <nV>
389   //! to make it interfere with edge.
390   //! Returns TRUE if intersection happened.
391   Standard_EXPORT Standard_Boolean ForceInterfVE(const Standard_Integer nV,
392                                                  Handle(BOPDS_PaveBlock)& aPB,
393                                                  BOPCol_MapOfInteger& theMEdges);
394
395   //! Updates tolerance of vertex with index <nV>
396   //! to make it interfere with face with index <nF>
397   Standard_EXPORT Standard_Boolean ForceInterfVF (const Standard_Integer nV, const Standard_Integer nF);
398   
399
400   //! Checks if there are any common or intersecting sub shapes
401   //! between two planar faces.
402   Standard_EXPORT Standard_Boolean CheckPlanes (const Standard_Integer nF1, const Standard_Integer nF2) const;
403   
404
405   //! Creates new edge from the edge nE with vertices nV1 and nV2
406   //! and returns the index of that new edge in the DS.
407   Standard_EXPORT Standard_Integer SplitEdge (const Standard_Integer nE, const Standard_Integer nV1, const Standard_Real aT1, const Standard_Integer nV2, const Standard_Real aT2);
408   
409
410   //! Updates pave blocks which have the paves with indices contained
411   //! in the map <aDMNewSD>.
412   Standard_EXPORT void UpdatePaveBlocks(const BOPCol_DataMapOfIntegerInteger& aDMNewSD);
413
414   //! Updates tolerance vertex nV due to V/E interference.
415   //! It always creates new vertex if nV is from arguments.
416   //! @return  DS index of updated vertex.
417   Standard_EXPORT Standard_Integer UpdateVertex(const Standard_Integer nV,
418                                                 const Standard_Real aTolNew);
419    
420   Standard_EXPORT void UpdatePaveBlocksWithSDVertices();
421
422   Standard_EXPORT void UpdateCommonBlocksWithSDVertices();
423    
424   Standard_EXPORT void UpdateBlocksWithSharedVertices();
425
426   Standard_EXPORT void UpdateInterfsWithSDVertices();
427
428   Standard_EXPORT Standard_Boolean EstimatePaveOnCurve(const Standard_Integer nV,
429                                                        const BOPDS_Curve& theNC,
430                                                        const Standard_Real theTolR3D);
431       
432   Standard_EXPORT void UpdateEdgeTolerance(const Standard_Integer nE,
433                                            const Standard_Real aTolNew);
434
435   Standard_EXPORT void RemovePaveBlocks(const BOPCol_MapOfInteger theEdges);
436
437   Standard_EXPORT void CorrectToleranceOfSE();
438
439   //! Reduce the intersection range using the common ranges of
440   //! Edge/Edge interferences to avoid creation of close
441   //! intersection vertices
442   Standard_EXPORT void ReduceIntersectionRange(const Standard_Integer theV1,
443                                                const Standard_Integer theV2,
444                                                const Standard_Integer theE,
445                                                const Standard_Integer theF,
446                                                Standard_Real& theTS1,
447                                                Standard_Real& theTS2);
448
449   //! Gets the bounding box for the given Pave Block.
450   //! If Pave Block has shrunk data it will be used to get the box,
451   //! and the Shrunk Range (<theSFirst>, <theSLast>).
452   //! Otherwise the box will be computed using BndLib_Add3dCurve method,
453   //! and the Shrunk Range will be equal to the PB's range.
454   //! To avoid re-computation of the bounding box for the same Pave Block
455   //! it will be saved in the map <thePBBox>.
456   //! Returns FALSE in case the PB's range is less than the
457   //! Precision::PConfusion(), otherwise returns TRUE.
458   Standard_EXPORT Standard_Boolean GetPBBox(const TopoDS_Edge& theE,
459                                             const Handle(BOPDS_PaveBlock)& thePB,
460                                             BOPAlgo_DataMapOfPaveBlockBndBox& thePBBox,
461                                             Standard_Real& theFirst,
462                                             Standard_Real& theLast,
463                                             Standard_Real& theSFirst,
464                                             Standard_Real& theSLast,
465                                             Bnd_Box& theBox);
466
467   //! Treatment of the possible common zones, not detected by the
468   //! Face/Face intersection algorithm, by intersection of each section edge
469   //! with all faces not participated in creation of that section edge.
470   //! If the intersection says that the section edge is lying on the face
471   //! it will be added into FaceInfo structure of the face as IN edge
472   //! and will be used for splitting.
473   Standard_EXPORT void PutSEInOtherFaces();
474
475   //! Analyzes the results of interferences of sub-shapes of the shapes
476   //! looking for self-interfering entities by the following rules:<br>
477   //! 1. The Faces of the same shape considered interfering in case they:<br>
478   //!    - Interfere with the other shapes in the same place (in the same vertex) or;<br>
479   //!    - Included in the same common block.
480   //! 2. The Faces of the same shape considered interfering in case they
481   //!    share the IN or SECTION edges.<br>
482   //! In case self-interference is found the warning is added.
483   Standard_EXPORT void CheckSelfInterference();
484
485   //! Adds the warning about failed intersection of pair of sub-shapes
486   Standard_EXPORT void AddIntersectionFailedWarning(const TopoDS_Shape& theS1, const TopoDS_Shape& theS2);
487
488   //! The method looks for the additional common blocks among pairs of edges
489   //! which did not participate in edges intersection (PerformEE() method)
490   //! due to being rejected by bounding boxes intersection.
491   Standard_EXPORT void ForceInterfEE();
492
493
494   BOPCol_ListOfShape myArguments;
495   BOPDS_PDS myDS;
496   BOPDS_PIterator myIterator;
497   Handle(IntTools_Context) myContext;
498   BOPAlgo_SectionAttribute mySectionAttribute;
499   Standard_Boolean myNonDestructive;
500   Standard_Boolean myIsPrimary;
501   Standard_Boolean myAvoidBuildPCurve;
502   BOPAlgo_GlueEnum myGlue;
503
504
505 private:
506
507 };
508
509 #endif // _BOPAlgo_PaveFiller_HeaderFile