Salome HOME
Merge from V6_main_20120808 08Aug12
[modules/geom.git] / src / NMTTools / NMTTools_DEProcessor.hxx
1 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
10 //
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 // Lesser General Public License for more details.
15 //
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
19 //
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22
23 // File:        NMTTools_DEProcessor.hxx
24 // Created:     Wed Sep 12 12:10:52 2001
25 // Author:      Peter KURNEV
26 //              <pkv@irinox>
27
28 #ifndef _NMTTools_DEProcessor_HeaderFile
29 #define _NMTTools_DEProcessor_HeaderFile
30
31 #include <Standard.hxx>
32 #include <Standard_Macro.hxx>
33 #include <NMTTools_PPaveFiller.hxx>
34 #include <NMTDS_PShapesDataStructure.hxx>
35 #include <Standard_Boolean.hxx>
36 #include <BOPTools_IndexedDataMapOfIntegerDEInfo.hxx>
37 #include <NMTTools_PaveFiller.hxx>
38 #include <Standard_Integer.hxx>
39 #include <Standard_Real.hxx>
40
41
42 //! <br>
43 //!  The  Algorithm to compute and store in interferences' pool <br>
44 //! and in the Data  Structure  the following values <br>
45 //! for degenerated edges <br>
46 //!         1.  Paves/Pave set(s) <br>
47 //!         2.  Split parts <br>
48 //!         3.  States (3D) for split parts <br>
49 //! <br>
50 //=======================================================================
51 //class    : NMTTools_DEProcessor
52 //purpose  :
53 //=======================================================================
54 class NMTTools_DEProcessor  {
55 public:
56
57
58
59 //! Constructor <br>
60 //! <br>
61 //! Constructor <br>
62 //! <br>
63   Standard_EXPORT
64     NMTTools_DEProcessor(NMTTools_PaveFiller& aFiller);
65
66 //! Launches the processor <br>
67   Standard_EXPORT
68     void Do() ;
69
70 //! Returns TRUE if it is Ok <br>
71   Standard_EXPORT
72     Standard_Boolean IsDone() const;
73
74
75
76 protected:
77   Standard_EXPORT
78     void FindDegeneratedEdges() ;
79
80   Standard_EXPORT
81     void DoPaves() ;
82
83   Standard_EXPORT
84     void FindPaveBlocks(const Standard_Integer nED,
85                         const Standard_Integer nVD,
86                         const Standard_Integer nFD,
87                         BOPTools_ListOfPaveBlock& aLPB) ;
88
89   Standard_EXPORT
90     void FillPaveSet(const Standard_Integer nED,
91                      const Standard_Integer nVD,
92                      const Standard_Integer nFD,
93                      const BOPTools_ListOfPaveBlock& aLPB) ;
94
95   Standard_EXPORT
96     void FillSplitEdgesPool(const Standard_Integer nED) ;
97
98   Standard_EXPORT
99     void MakeSplitEdges(const Standard_Integer nED,
100                         const Standard_Integer nFD) ;
101
102   Standard_EXPORT
103     void MakeSplitEdge(const TopoDS_Edge& aS1,
104                        const TopoDS_Face& aF,
105                        const TopoDS_Vertex& aV1,
106                        const Standard_Real aP1,
107                        const TopoDS_Vertex& aV2,
108                        const Standard_Real aP2,
109                        TopoDS_Edge& aNewEdge) ;
110
111
112   NMTTools_PPaveFiller myFiller;
113   NMTDS_PShapesDataStructure myDS;
114   Standard_Boolean myIsDone;
115   BOPTools_IndexedDataMapOfIntegerDEInfo myDEMap;
116 };
117 #endif