Salome HOME
eaba040f36eae1e0e5ec33153688c4e6f017df9b
[modules/geom.git] / src / PARTITION / Partition_Loop2d.hxx
1 // Copyright (C) 2005  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
3 // 
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either 
7 // version 2.1 of the License.
8 // 
9 // This library is distributed in the hope that it will be useful 
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of 
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
12 // Lesser General Public License for more details.
13 //
14 // You should have received a copy of the GNU Lesser General Public  
15 // License along with this library; if not, write to the Free Software 
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
17 //
18 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 //
20 //  GEOM PARTITION : partition algorithm
21 //
22 //  File   : Partition_Loop2d.hxx
23 //  Module : GEOM
24
25 #ifndef _Partition_Loop2d_HeaderFile
26 #define _Partition_Loop2d_HeaderFile
27
28 #ifndef _TopoDS_Face_HeaderFile
29 #include <TopoDS_Face.hxx>
30 #endif
31 #ifndef _TopAbs_Orientation_HeaderFile
32 #include <TopAbs_Orientation.hxx>
33 #endif
34 #ifndef _TopTools_ListOfShape_HeaderFile
35 #include <TopTools_ListOfShape.hxx>
36 #endif
37 #ifndef _TopTools_MapOfShape_HeaderFile
38 #include <TopTools_MapOfShape.hxx>
39 #endif
40 class TopoDS_Face;
41 class TopoDS_Edge;
42 class TopTools_ListOfShape;
43 class BRepAlgo_Image;
44
45
46 #ifndef _Standard_HeaderFile
47 #include <Standard.hxx>
48 #endif
49 #ifndef _Standard_Macro_HeaderFile
50 #include <Standard_Macro.hxx>
51 #endif
52
53 class Partition_Loop2d  {
54
55 public:
56
57     void* operator new(size_t,void* anAddress) 
58       {
59         return anAddress;
60       }
61     void* operator new(size_t size) 
62       { 
63         return Standard::Allocate(size); 
64       }
65     void  operator delete(void *anAddress) 
66       { 
67         if (anAddress) Standard::Free((Standard_Address&)anAddress); 
68       }
69  // Methods PUBLIC
70  // 
71 Standard_EXPORT Partition_Loop2d();
72 Standard_EXPORT   void Init(const TopoDS_Face& F) ;
73 Standard_EXPORT   void AddConstEdge(const TopoDS_Edge& E) ;
74 Standard_EXPORT   void AddSectionEdge(const TopoDS_Edge& E) ;
75 Standard_EXPORT   void Perform() ;
76 Standard_EXPORT  const TopTools_ListOfShape& NewWires() const;
77 Standard_EXPORT   void WiresToFaces(const BRepAlgo_Image& EdgeImage) ;
78 Standard_EXPORT  const TopTools_ListOfShape& NewFaces() const;
79
80
81
82
83
84 protected:
85
86  // Methods PROTECTED
87  // 
88
89
90  // Fields PROTECTED
91  //
92
93
94 private: 
95
96  // Methods PRIVATE
97  // 
98
99
100  // Fields PRIVATE
101  //
102 TopoDS_Face myFace;
103 TopAbs_Orientation myFaceOri;
104 TopTools_ListOfShape myConstEdges;
105 TopTools_ListOfShape myNewWires;
106 TopTools_ListOfShape myNewFaces;
107 TopTools_ListOfShape myInternalWL;
108 TopTools_MapOfShape mySectionEdges;
109
110
111 };
112
113
114
115
116
117 // other Inline functions and methods (like "C++: function call" methods)
118 //
119
120
121 #endif