Salome HOME
Update from BR_V5_DEV 13Feb2009
[modules/geom.git] / src / NMTAlgo / NMTAlgo_Builder.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 #ifndef _NMTAlgo_Builder_HeaderFile
23 #define _NMTAlgo_Builder_HeaderFile
24
25 #ifndef _BRepAlgo_Image_HeaderFile
26 #include <BRepAlgo_Image.hxx>
27 #endif
28 #ifndef _TopTools_IndexedMapOfShape_HeaderFile
29 #include <TopTools_IndexedMapOfShape.hxx>
30 #endif
31 #ifndef _TopTools_IndexedDataMapOfShapeListOfShape_HeaderFile
32 #include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
33 #endif
34 #ifndef _TopTools_IndexedDataMapOfShapeShape_HeaderFile
35 #include <TopTools_IndexedDataMapOfShapeShape.hxx>
36 #endif
37 #ifndef _NMTAlgo_Algo_HeaderFile
38 #include <NMTAlgo_Algo.hxx>
39 #endif
40 #ifndef _Standard_Boolean_HeaderFile
41 #include <Standard_Boolean.hxx>
42 #endif
43 class NMTTools_DSFiller;
44 class TopoDS_Edge;
45 class TopoDS_Face;
46
47
48 #ifndef _Standard_HeaderFile
49 #include <Standard.hxx>
50 #endif
51 #ifndef _Standard_Macro_HeaderFile
52 #include <Standard_Macro.hxx>
53 #endif
54
55 class NMTAlgo_Builder  : public NMTAlgo_Algo {
56
57 public:
58
59     void* operator new(size_t,void* anAddress) 
60       {
61         return anAddress;
62       }
63     void* operator new(size_t size) 
64       { 
65         return Standard::Allocate(size); 
66       }
67     void  operator delete(void *anAddress) 
68       { 
69         if (anAddress) Standard::Free((Standard_Address&)anAddress); 
70       }
71  // Methods PUBLIC
72  // 
73 Standard_EXPORT NMTAlgo_Builder();
74 Standard_EXPORT virtual ~NMTAlgo_Builder();
75 Standard_EXPORT virtual  void Clear() ;
76 Standard_EXPORT virtual  void ComputeWithFiller(const NMTTools_DSFiller& aDSF) ;
77
78
79
80
81
82 protected:
83
84  // Methods PROTECTED
85  // 
86 Standard_EXPORT   void FillImagesEdges() ;
87 Standard_EXPORT   void FillIn2DParts() ;
88 Standard_EXPORT   void FillImagesFaces() ;
89 Standard_EXPORT   void FillSDFaces() ;
90 Standard_EXPORT   void SplitVertices() ;
91 Standard_EXPORT   Standard_Boolean IsSectionEdge(const TopoDS_Edge& E) const;
92 Standard_EXPORT   Standard_Boolean HasSameDomainF(const TopoDS_Face& F) const;
93 Standard_EXPORT   Standard_Boolean IsSameDomainF(const TopoDS_Face& F1,const TopoDS_Face& F2) const;
94
95
96  // Fields PROTECTED
97  //
98 BRepAlgo_Image myImagesEdges;
99 BRepAlgo_Image myImagesFaces;
100 TopTools_IndexedMapOfShape myQueryShapes;
101 TopTools_IndexedDataMapOfShapeListOfShape myIn2DParts;
102 TopTools_IndexedDataMapOfShapeListOfShape mySectionParts;
103 TopTools_IndexedDataMapOfShapeShape mySDFaces;
104
105
106 private: 
107
108  // Methods PRIVATE
109  // 
110
111
112  // Fields PRIVATE
113  //
114
115
116 };
117
118
119
120
121
122 // other Inline functions and methods (like "C++: function call" methods)
123 //
124
125
126 #endif