Salome HOME
Internal issue 0022865: Restructurization of Partition packages.
[modules/geom.git] / src / GEOMAlgo_NEW / GEOMAlgo_BuilderArea.hxx
1 // Copyright (C) 2007-2011  CEA/DEN, EDF R&D, OPEN CASCADE\r
2 //\r
3 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,\r
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS\r
5 //\r
6 // This library is free software; you can redistribute it and/or\r
7 // modify it under the terms of the GNU Lesser General Public\r
8 // License as published by the Free Software Foundation; either\r
9 // version 2.1 of the License.\r
10 //\r
11 // This library is distributed in the hope that it will be useful,\r
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of\r
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
14 // Lesser General Public License for more details.\r
15 //\r
16 // You should have received a copy of the GNU Lesser General Public\r
17 // License along with this library; if not, write to the Free Software\r
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA\r
19 //\r
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com\r
21 //\r
22 \r
23 // File:        GEOMAlgo_BuilderArea.hxx\r
24 // Created:     \r
25 // Author:      Peter KURNEV \r
26 //\r
27 \r
28 #ifndef _GEOMAlgo_BuilderArea_HeaderFile\r
29 #define _GEOMAlgo_BuilderArea_HeaderFile\r
30 \r
31 #include <Standard.hxx>\r
32 #include <Standard_Macro.hxx>\r
33 #include <TopTools_ListOfShape.hxx>\r
34 #include <TopTools_MapOfOrientedShape.hxx>\r
35 #include <Handle_IntTools_Context.hxx>\r
36 #include <GEOMAlgo_Algo.hxx>\r
37 #include <IntTools_Context.hxx>\r
38 \r
39 //! The root class for algorithms to build <br>\r
40 //!          faces/solids from set of edges/faces <br>\r
41 //=======================================================================\r
42 //class    : GEOMAlgo_BuilderArea\r
43 //purpose  : \r
44 //=======================================================================\r
45 class GEOMAlgo_BuilderArea  : public GEOMAlgo_Algo \r
46 {\r
47  public:\r
48   //! Sets cashed geometrical tools <br>\r
49   Standard_EXPORT\r
50     void SetContext(const Handle(IntTools_Context)& theContext) ;\r
51   \r
52   //! Returns cashed geometrical tools <br>\r
53   Standard_EXPORT\r
54     const Handle_IntTools_Context& Context() const;\r
55   \r
56   //! Sets edges/faces to process <br>\r
57   Standard_EXPORT\r
58     void SetShapes(const TopTools_ListOfShape& theLS) ;\r
59   \r
60   //! Returns edges/faces to process <br>\r
61   Standard_EXPORT\r
62     const TopTools_ListOfShape& Shapes() const;\r
63   \r
64   //! Returns wires/shells that have been built <br>\r
65   Standard_EXPORT\r
66     const TopTools_ListOfShape& Loops() const;\r
67   \r
68   //! Returns faces/solids that have been built <br>\r
69   Standard_EXPORT\r
70     const TopTools_ListOfShape& Areas() const;\r
71   \r
72   Standard_EXPORT\r
73     virtual  void Perform() ;\r
74 \r
75  protected:\r
76   //!  Empty  constructor <br>\r
77   Standard_EXPORT\r
78     GEOMAlgo_BuilderArea();\r
79 \r
80   Standard_EXPORT\r
81     virtual ~GEOMAlgo_BuilderArea();\r
82   //!  Collect the edges/faces that <br>\r
83   //!           a) are internal <br>\r
84   //!           b) are the same and have different orientation <br>\r
85   \r
86   Standard_EXPORT\r
87     virtual  void PerformShapesToAvoid() ;\r
88 \r
89   //! Build draft faces/shells <br>\r
90   //!          a)myLoops - draft faces/shells that consist of <br>\r
91   //!                      boundary edges/faces <br>\r
92   //!          b)myLoopsInternal - draft faces/shells that contains <br>\r
93   //!                               inner edges/faces <br>\r
94   Standard_EXPORT\r
95     virtual  void PerformLoops() ;\r
96   //! Build draft faces/solids that contains boundary faces <br>\r
97   \r
98   Standard_EXPORT\r
99     virtual  void PerformAreas() ;\r
100   \r
101   //! Build finalized faces/solids with internal wires/shells <br>\r
102   Standard_EXPORT\r
103     virtual  void PerformInternalShapes() ;\r
104 \r
105   TopTools_ListOfShape myShapes;\r
106   TopTools_ListOfShape myLoops;\r
107   TopTools_ListOfShape myLoopsInternal;\r
108   TopTools_MapOfOrientedShape myShapesToAvoid;\r
109   TopTools_ListOfShape myAreas;\r
110   Handle_IntTools_Context myContext;\r
111 };\r
112 #endif\r