]> SALOME platform Git repositories - modules/geom.git/blob - src/NMTTools/NMTTools_Tools.hxx
Salome HOME
0021434: Boolean operations generate a shape with big vertex tolerance.
[modules/geom.git] / src / NMTTools / NMTTools_Tools.hxx
1 // Copyright (C) 2007-2011  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 _NMTTools_Tools_HeaderFile
23 #define _NMTTools_Tools_HeaderFile
24
25 #ifndef _Standard_HeaderFile
26 #include <Standard.hxx>
27 #endif
28 #ifndef _Standard_Macro_HeaderFile
29 #include <Standard_Macro.hxx>
30 #endif
31
32 #include <Basics_OCCTVersion.hxx>
33
34 #ifndef _Standard_Boolean_HeaderFile
35 #include <Standard_Boolean.hxx>
36 #endif
37 #ifndef _Handle_Geom2d_Curve_HeaderFile
38 #include <Handle_Geom2d_Curve.hxx>
39 #endif
40 #ifndef _Standard_Real_HeaderFile
41 #include <Standard_Real.hxx>
42 #endif
43
44 #if OCC_VERSION_LARGE > 0x06050200
45 #include <Handle_IntTools_Context.hxx>
46 #else
47 class IntTools_Context;
48 #endif
49
50 class TopTools_ListOfShape;
51 class TopoDS_Vertex;
52 class BOPTools_CArray1OfVVInterference;
53 class BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger;
54 class BOPTools_CArray1OfSSInterference;
55 class TopoDS_Edge;
56 class TopoDS_Face;
57 class NMTTools_ListOfCoupleOfShape;
58 class NMTTools_IndexedDataMapOfShapeIndexedMapOfShape;
59 class Geom2d_Curve;
60
61 class NMTTools_Tools  {
62 public:
63
64   void* operator new(size_t,void* anAddress)
65   {
66     return anAddress;
67   }
68   void* operator new(size_t size)
69   {
70     return Standard::Allocate(size);
71   }
72   void  operator delete(void *anAddress)
73   {
74     if (anAddress) Standard::Free((Standard_Address&)anAddress);
75   }
76
77
78   Standard_EXPORT static  void MakeNewVertex(const TopTools_ListOfShape& aLV,TopoDS_Vertex& aNewVertex) ;
79
80   Standard_EXPORT static  void FindChains(const BOPTools_CArray1OfVVInterference& aVVs,BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger& aMCX) ;
81
82   Standard_EXPORT static  void FindChains(const BOPTools_CArray1OfSSInterference& aVVs,BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger& aMCX) ;
83
84   Standard_EXPORT static  void FindChains(const BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger& aMCV,BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger& aMCX) ;
85
86   Standard_EXPORT static  Standard_Boolean IsSplitInOnFace (const TopoDS_Edge& aE,
87                                                             const TopoDS_Face& aF,
88 #if OCC_VERSION_LARGE > 0x06050200
89                                                             const Handle(IntTools_Context)& aCtx);
90 #else
91                                                             IntTools_Context& aCtx);
92 #endif
93
94   Standard_EXPORT static  Standard_Boolean AreFacesSameDomain (const TopoDS_Face& aF1,
95                                                                const TopoDS_Face& aF2,
96 #if OCC_VERSION_LARGE > 0x06050200
97                                                                const Handle(IntTools_Context)& aCtx);
98 #else
99                                                                IntTools_Context& aCtx);
100 #endif
101
102   Standard_EXPORT static  void FindChains(const NMTTools_ListOfCoupleOfShape& aLCS,NMTTools_IndexedDataMapOfShapeIndexedMapOfShape& aM) ;
103
104   Standard_EXPORT static  void FindChains(const NMTTools_IndexedDataMapOfShapeIndexedMapOfShape& aM1,NMTTools_IndexedDataMapOfShapeIndexedMapOfShape& aM2) ;
105
106   Standard_EXPORT static  void MakePCurve(const TopoDS_Edge& aE,const TopoDS_Face& aF,const Handle(Geom2d_Curve)& aC2D) ;
107
108   Standard_EXPORT static  void UpdateEdge(const TopoDS_Edge& aE,const Standard_Real aTol) ;
109
110 protected:
111
112 private:
113
114 };
115
116 // other Inline functions and methods (like "C++: function call" methods)
117
118 #endif