Salome HOME
Mantis issue 0020685: GetShapesOnShape: correct argument theCheckShape description.
[modules/geom.git] / src / PARTITION / Partition_Loop2d.hxx
1 //  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 //  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
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.
10 //
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.
15 //
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
19 //
20 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22 //  GEOM PARTITION : partition algorithm
23 //  File   : Partition_Loop2d.hxx
24 //  Module : GEOM
25 //
26 #ifndef _Partition_Loop2d_HeaderFile
27 #define _Partition_Loop2d_HeaderFile
28
29 #ifndef _TopoDS_Face_HeaderFile
30 #include <TopoDS_Face.hxx>
31 #endif
32 #ifndef _TopAbs_Orientation_HeaderFile
33 #include <TopAbs_Orientation.hxx>
34 #endif
35 #ifndef _TopTools_ListOfShape_HeaderFile
36 #include <TopTools_ListOfShape.hxx>
37 #endif
38 #ifndef _TopTools_MapOfShape_HeaderFile
39 #include <TopTools_MapOfShape.hxx>
40 #endif
41 class TopoDS_Face;
42 class TopoDS_Edge;
43 class TopTools_ListOfShape;
44 class BRepAlgo_Image;
45
46
47 #ifndef _Standard_HeaderFile
48 #include <Standard.hxx>
49 #endif
50 #ifndef _Standard_Macro_HeaderFile
51 #include <Standard_Macro.hxx>
52 #endif
53
54 class Partition_Loop2d  {
55
56 public:
57
58     void* operator new(size_t,void* anAddress) 
59       {
60         return anAddress;
61       }
62     void* operator new(size_t size) 
63       { 
64         return Standard::Allocate(size); 
65       }
66     void  operator delete(void *anAddress) 
67       { 
68         if (anAddress) Standard::Free((Standard_Address&)anAddress); 
69       }
70  // Methods PUBLIC
71  // 
72 Standard_EXPORT Partition_Loop2d();
73 Standard_EXPORT   void Init(const TopoDS_Face& F) ;
74 Standard_EXPORT   void AddConstEdge(const TopoDS_Edge& E) ;
75 Standard_EXPORT   void AddSectionEdge(const TopoDS_Edge& E) ;
76 Standard_EXPORT   void Perform() ;
77 Standard_EXPORT  const TopTools_ListOfShape& NewWires() const;
78 Standard_EXPORT   void WiresToFaces(const BRepAlgo_Image& EdgeImage) ;
79 Standard_EXPORT  const TopTools_ListOfShape& NewFaces() const;
80
81
82
83
84
85 protected:
86
87  // Methods PROTECTED
88  // 
89
90
91  // Fields PROTECTED
92  //
93
94
95 private: 
96
97  // Methods PRIVATE
98  // 
99
100
101  // Fields PRIVATE
102  //
103 TopoDS_Face myFace;
104 TopAbs_Orientation myFaceOri;
105 TopTools_ListOfShape myConstEdges;
106 TopTools_ListOfShape myNewWires;
107 TopTools_ListOfShape myNewFaces;
108 TopTools_ListOfShape myInternalWL;
109 TopTools_MapOfShape mySectionEdges;
110
111
112 };
113
114
115
116
117
118 // other Inline functions and methods (like "C++: function call" methods)
119 //
120
121
122 #endif