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