Salome HOME
0020660: EDF 1238 GEOM: Missing equivalent of 2nd contructor of LCS in TUI
[modules/geom.git] / src / PARTITION / Partition_Inter3d.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_Inter3d.hxx
24 //  Module : GEOM
25 //
26 #ifndef _Partition_Inter3d_HeaderFile
27 #define _Partition_Inter3d_HeaderFile
28
29 #ifndef _Handle_BRepAlgo_AsDes_HeaderFile
30 #include <Handle_BRepAlgo_AsDes.hxx>
31 #endif
32 #ifndef _TopTools_DataMapOfShapeListOfShape_HeaderFile
33 #include <TopTools_DataMapOfShapeListOfShape.hxx>
34 #endif
35 #ifndef _TopTools_MapOfShape_HeaderFile
36 #include <TopTools_MapOfShape.hxx>
37 #endif
38 #ifndef _TopTools_DataMapOfShapeShape_HeaderFile
39 #include <TopTools_DataMapOfShapeShape.hxx>
40 #endif
41 #ifndef _Standard_Boolean_HeaderFile
42 #include <Standard_Boolean.hxx>
43 #endif
44 class BRepAlgo_AsDes;
45 class TopTools_ListOfShape;
46 class TopTools_DataMapOfShapeShape;
47 class TopoDS_Face;
48 class TopTools_MapOfShape;
49 class TopoDS_Shape;
50 class TopoDS_Vertex;
51 class TopoDS_Edge;
52
53
54 #ifndef _Standard_HeaderFile
55 #include <Standard.hxx>
56 #endif
57 #ifndef _Standard_Macro_HeaderFile
58 #include <Standard_Macro.hxx>
59 #endif
60
61 class Partition_Inter3d  {
62
63 public:
64
65     void* operator new(size_t,void* anAddress) 
66       {
67         return anAddress;
68       }
69     void* operator new(size_t size) 
70       { 
71         return Standard::Allocate(size); 
72       }
73     void  operator delete(void *anAddress) 
74       { 
75         if (anAddress) Standard::Free((Standard_Address&)anAddress); 
76       }
77  // Methods PUBLIC
78  // 
79 Standard_EXPORT Partition_Inter3d();
80 Standard_EXPORT Partition_Inter3d(const Handle(BRepAlgo_AsDes)& AsDes);
81 Standard_EXPORT   void CompletPart3d(const TopTools_ListOfShape& SetOfFaces1,const TopTools_DataMapOfShapeShape& FaceShapeMap) ;
82 Standard_EXPORT   void FacesPartition(const TopoDS_Face& F1,const TopoDS_Face& F2) ;
83 Standard_EXPORT   Standard_Boolean IsDone(const TopoDS_Face& F1,const TopoDS_Face& F2) const;
84 Standard_EXPORT   TopTools_MapOfShape& TouchedFaces() ;
85 Standard_EXPORT   Handle_BRepAlgo_AsDes AsDes() const;
86 Standard_EXPORT   TopTools_MapOfShape& NewEdges() ;
87 Standard_EXPORT   Standard_Boolean HasSameDomainF(const TopoDS_Shape& F) const;
88 Standard_EXPORT   Standard_Boolean IsSameDomainF(const TopoDS_Shape& F1,const TopoDS_Shape& F2) const;
89 Standard_EXPORT  const TopTools_ListOfShape& SameDomain(const TopoDS_Face& F) const;
90 Standard_EXPORT   TopoDS_Vertex ReplaceSameDomainV(const TopoDS_Vertex& V,const TopoDS_Edge& E) const;
91 Standard_EXPORT   Handle_BRepAlgo_AsDes SectionEdgesAD() const;
92 Standard_EXPORT   Standard_Boolean IsSectionEdge(const TopoDS_Edge& E) const;
93 Standard_EXPORT   Standard_Boolean HasSectionEdge(const TopoDS_Face& F) const;
94 Standard_EXPORT   Standard_Boolean IsSplitOn(const TopoDS_Edge& NewE,const TopoDS_Edge& OldE,const TopoDS_Face& F) const;
95 Standard_EXPORT  const TopTools_ListOfShape& SectionEdgeFaces(const TopoDS_Edge& SecE) const;
96
97
98
99
100
101 protected:
102
103  // Methods PROTECTED
104  // 
105
106
107  // Fields PROTECTED
108  //
109
110
111 private: 
112
113  // Methods PRIVATE
114  // 
115 Standard_EXPORT   void Inter3D(const TopoDS_Face& F1,const TopoDS_Face& F2,TopTools_ListOfShape& LInt) ;
116 Standard_EXPORT   void StorePart3d(const TopoDS_Face& F1,const TopoDS_Face& F2,const TopTools_ListOfShape& LInt1) ;
117 Standard_EXPORT   void SetDone(const TopoDS_Face& F1,const TopoDS_Face& F2) ;
118 Standard_EXPORT   void Affiche(const TopTools_ListOfShape& SetOfFaces) const;
119
120
121  // Fields PRIVATE
122  //
123 Handle_BRepAlgo_AsDes myAsDes;
124 TopTools_DataMapOfShapeListOfShape myDone;
125 TopTools_MapOfShape myTouched;
126 TopTools_MapOfShape myNewEdges;
127 Handle_BRepAlgo_AsDes mySectionEdgesAD;
128 TopTools_DataMapOfShapeListOfShape mySameDomainFM;
129 TopTools_DataMapOfShapeShape mySameDomainVM;
130
131
132 };
133
134
135
136
137
138 // other Inline functions and methods (like "C++: function call" methods)
139 //
140
141
142 #endif