1 // Copyright (C) 2007-2011 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
22 #ifndef _GEOMAlgo_BuilderArea_HeaderFile
23 #define _GEOMAlgo_BuilderArea_HeaderFile
25 #include <Basics_OCCTVersion.hxx>
27 #ifndef _TopTools_ListOfShape_HeaderFile
28 #include <TopTools_ListOfShape.hxx>
30 #ifndef _TopTools_MapOfOrientedShape_HeaderFile
31 #include <TopTools_MapOfOrientedShape.hxx>
34 #if OCC_VERSION_LARGE > 0x06050200
35 #include <Handle_IntTools_Context.hxx>
37 #include <IntTools_PContext.hxx>
40 #ifndef _GEOMAlgo_Algo_HeaderFile
41 #include <GEOMAlgo_Algo.hxx>
43 class IntTools_Context;
44 class TopTools_ListOfShape;
47 #ifndef _Standard_HeaderFile
48 #include <Standard.hxx>
50 #ifndef _Standard_Macro_HeaderFile
51 #include <Standard_Macro.hxx>
54 //! The root class for algorithms to build <br>
55 //! faces/solids from set of edges/faces <br>
56 class GEOMAlgo_BuilderArea : public GEOMAlgo_Algo {
60 void* operator new(size_t,void* anAddress)
64 void* operator new(size_t size)
66 return Standard::Allocate(size);
68 void operator delete(void *anAddress)
70 if (anAddress) Standard::Free((Standard_Address&)anAddress);
73 //! Sets cashed geometrical tools <br>
74 #if OCC_VERSION_LARGE > 0x06050200
75 Standard_EXPORT void SetContext(const Handle(IntTools_Context)& theContext) ;
77 Standard_EXPORT void SetContext(const IntTools_Context& theContext) ;
80 #if OCC_VERSION_LARGE > 0x06050200
81 //! Returns cashed geometrical tools <br>
82 Standard_EXPORT const Handle_IntTools_Context& Context() const;
85 //! Sets edges/faces to process <br>
86 Standard_EXPORT void SetShapes(const TopTools_ListOfShape& theLS) ;
88 //! Returns edges/faces to process <br>
89 Standard_EXPORT const TopTools_ListOfShape& Shapes() const;
91 //! Returns wires/shells that have been built <br>
92 Standard_EXPORT const TopTools_ListOfShape& Loops() const;
94 //! Returns faces/solids that have been built <br>
95 Standard_EXPORT const TopTools_ListOfShape& Areas() const;
97 #if OCC_VERSION_LARGE > 0x06050200
98 Standard_EXPORT virtual void Perform() ;
103 //! Empty constructor <br>
104 Standard_EXPORT GEOMAlgo_BuilderArea();
105 Standard_EXPORT virtual ~GEOMAlgo_BuilderArea();
106 //! Collect the edges/faces that <br>
107 //! a) are internal <br>
108 //! b) are the same and have different orientation <br>
109 Standard_EXPORT virtual void PerformShapesToAvoid() ;
110 //! Build draft faces/shells <br>
111 //! a)myLoops - draft faces/shells that consist of <br>
112 //! boundary edges/faces <br>
113 //! b)myLoopsInternal - draft faces/shells that contains <br>
114 //! inner edges/faces <br>
115 Standard_EXPORT virtual void PerformLoops() ;
116 //! Build draft faces/solids that contains boundary faces <br>
117 Standard_EXPORT virtual void PerformAreas() ;
118 //! Build finalized faces/solids with internal wires/shells <br>
119 Standard_EXPORT virtual void PerformInternalShapes() ;
122 TopTools_ListOfShape myShapes;
123 TopTools_ListOfShape myLoops;
124 TopTools_ListOfShape myLoopsInternal;
125 TopTools_MapOfOrientedShape myShapesToAvoid;
126 TopTools_ListOfShape myAreas;
127 #if OCC_VERSION_LARGE > 0x06050200
128 Handle_IntTools_Context myContext;
130 IntTools_PContext myContext;
142 // other Inline functions and methods (like "C++: function call" methods)