Salome HOME
Merge from V6_main_20120808 08Aug12
[modules/geom.git] / src / GEOMAlgo / GEOMAlgo_BuilderArea.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:        GEOMAlgo_BuilderArea.hxx
24 // Created:
25 // Author:      Peter KURNEV
26 //
27
28 #ifndef _GEOMAlgo_BuilderArea_HeaderFile
29 #define _GEOMAlgo_BuilderArea_HeaderFile
30
31 #include <Standard.hxx>
32 #include <Standard_Macro.hxx>
33 #include <TopTools_ListOfShape.hxx>
34 #include <TopTools_MapOfOrientedShape.hxx>
35 #include <Handle_IntTools_Context.hxx>
36 #include <GEOMAlgo_Algo.hxx>
37 #include <IntTools_Context.hxx>
38
39 //! The root class for algorithms to build <br>
40 //!          faces/solids from set of edges/faces <br>
41 //=======================================================================
42 //class    : GEOMAlgo_BuilderArea
43 //purpose  :
44 //=======================================================================
45 class GEOMAlgo_BuilderArea  : public GEOMAlgo_Algo
46 {
47  public:
48   //! Sets cashed geometrical tools <br>
49   Standard_EXPORT
50     void SetContext(const Handle(IntTools_Context)& theContext) ;
51
52   //! Returns cashed geometrical tools <br>
53   Standard_EXPORT
54     const Handle_IntTools_Context& Context() const;
55
56   //! Sets edges/faces to process <br>
57   Standard_EXPORT
58     void SetShapes(const TopTools_ListOfShape& theLS) ;
59
60   //! Returns edges/faces to process <br>
61   Standard_EXPORT
62     const TopTools_ListOfShape& Shapes() const;
63
64   //! Returns wires/shells that have been built <br>
65   Standard_EXPORT
66     const TopTools_ListOfShape& Loops() const;
67
68   //! Returns faces/solids that have been built <br>
69   Standard_EXPORT
70     const TopTools_ListOfShape& Areas() const;
71
72   Standard_EXPORT
73     virtual  void Perform() ;
74
75  protected:
76   //!  Empty  constructor <br>
77   Standard_EXPORT
78     GEOMAlgo_BuilderArea();
79
80   Standard_EXPORT
81     virtual ~GEOMAlgo_BuilderArea();
82   //!  Collect the edges/faces that <br>
83   //!           a) are internal <br>
84   //!           b) are the same and have different orientation <br>
85
86   Standard_EXPORT
87     virtual  void PerformShapesToAvoid() ;
88
89   //! Build draft faces/shells <br>
90   //!          a)myLoops - draft faces/shells that consist of <br>
91   //!                      boundary edges/faces <br>
92   //!          b)myLoopsInternal - draft faces/shells that contains <br>
93   //!                               inner edges/faces <br>
94   Standard_EXPORT
95     virtual  void PerformLoops() ;
96   //! Build draft faces/solids that contains boundary faces <br>
97
98   Standard_EXPORT
99     virtual  void PerformAreas() ;
100
101   //! Build finalized faces/solids with internal wires/shells <br>
102   Standard_EXPORT
103     virtual  void PerformInternalShapes() ;
104
105   TopTools_ListOfShape myShapes;
106   TopTools_ListOfShape myLoops;
107   TopTools_ListOfShape myLoopsInternal;
108   TopTools_MapOfOrientedShape myShapesToAvoid;
109   TopTools_ListOfShape myAreas;
110   Handle_IntTools_Context myContext;
111 };
112 #endif