1 // Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
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.
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.
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
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
23 // File: GEOMAlgo_BuilderArea.hxx
25 // Author: Peter KURNEV
28 #ifndef _GEOMAlgo_BuilderArea_HeaderFile
29 #define _GEOMAlgo_BuilderArea_HeaderFile
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>
39 //! The root class for algorithms to build <br>
40 //! faces/solids from set of edges/faces <br>
41 //=======================================================================
42 //class : GEOMAlgo_BuilderArea
44 //=======================================================================
45 class GEOMAlgo_BuilderArea : public GEOMAlgo_Algo
48 //! Sets cashed geometrical tools <br>
50 void SetContext(const Handle(IntTools_Context)& theContext) ;
52 //! Returns cashed geometrical tools <br>
54 const Handle_IntTools_Context& Context() const;
56 //! Sets edges/faces to process <br>
58 void SetShapes(const TopTools_ListOfShape& theLS) ;
60 //! Returns edges/faces to process <br>
62 const TopTools_ListOfShape& Shapes() const;
64 //! Returns wires/shells that have been built <br>
66 const TopTools_ListOfShape& Loops() const;
68 //! Returns faces/solids that have been built <br>
70 const TopTools_ListOfShape& Areas() const;
73 virtual void Perform() ;
76 //! Empty constructor <br>
78 GEOMAlgo_BuilderArea();
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>
87 virtual void PerformShapesToAvoid() ;
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>
95 virtual void PerformLoops() ;
96 //! Build draft faces/solids that contains boundary faces <br>
99 virtual void PerformAreas() ;
101 //! Build finalized faces/solids with internal wires/shells <br>
103 virtual void PerformInternalShapes() ;
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;