1 // GEOM PARTITION : partition algorithm
3 // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
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.
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.
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
20 // See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
24 // File : Partition_Inter3d.hxx
27 #ifndef _Partition_Inter3d_HeaderFile
28 #define _Partition_Inter3d_HeaderFile
30 #ifndef _Handle_BRepAlgo_AsDes_HeaderFile
31 #include <Handle_BRepAlgo_AsDes.hxx>
33 #ifndef _TopTools_DataMapOfShapeListOfShape_HeaderFile
34 #include <TopTools_DataMapOfShapeListOfShape.hxx>
36 #ifndef _TopTools_MapOfShape_HeaderFile
37 #include <TopTools_MapOfShape.hxx>
39 #ifndef _TopTools_DataMapOfShapeShape_HeaderFile
40 #include <TopTools_DataMapOfShapeShape.hxx>
42 #ifndef _Standard_Boolean_HeaderFile
43 #include <Standard_Boolean.hxx>
46 class TopTools_ListOfShape;
47 class TopTools_DataMapOfShapeShape;
49 class TopTools_MapOfShape;
55 #ifndef _Standard_HeaderFile
56 #include <Standard.hxx>
58 #ifndef _Standard_Macro_HeaderFile
59 #include <Standard_Macro.hxx>
62 class Partition_Inter3d {
66 void* operator new(size_t,void* anAddress)
70 void* operator new(size_t size)
72 return Standard::Allocate(size);
74 void operator delete(void *anAddress)
76 if (anAddress) Standard::Free((Standard_Address&)anAddress);
80 Standard_EXPORT Partition_Inter3d();
81 Standard_EXPORT Partition_Inter3d(const Handle(BRepAlgo_AsDes)& AsDes);
82 Standard_EXPORT void CompletPart3d(const TopTools_ListOfShape& SetOfFaces1,const TopTools_DataMapOfShapeShape& FaceShapeMap) ;
83 Standard_EXPORT void FacesPartition(const TopoDS_Face& F1,const TopoDS_Face& F2) ;
84 Standard_EXPORT Standard_Boolean IsDone(const TopoDS_Face& F1,const TopoDS_Face& F2) const;
85 Standard_EXPORT TopTools_MapOfShape& TouchedFaces() ;
86 Standard_EXPORT Handle_BRepAlgo_AsDes AsDes() const;
87 Standard_EXPORT TopTools_MapOfShape& NewEdges() ;
88 Standard_EXPORT Standard_Boolean HasSameDomainF(const TopoDS_Shape& F) const;
89 Standard_EXPORT Standard_Boolean IsSameDomainF(const TopoDS_Shape& F1,const TopoDS_Shape& F2) const;
90 Standard_EXPORT const TopTools_ListOfShape& SameDomain(const TopoDS_Face& F) const;
91 Standard_EXPORT TopoDS_Vertex ReplaceSameDomainV(const TopoDS_Vertex& V,const TopoDS_Edge& E) const;
92 Standard_EXPORT Handle_BRepAlgo_AsDes SectionEdgesAD() const;
93 Standard_EXPORT Standard_Boolean IsSectionEdge(const TopoDS_Edge& E) const;
94 Standard_EXPORT Standard_Boolean HasSectionEdge(const TopoDS_Face& F) const;
95 Standard_EXPORT Standard_Boolean IsSplitOn(const TopoDS_Edge& NewE,const TopoDS_Edge& OldE,const TopoDS_Face& F) const;
96 Standard_EXPORT const TopTools_ListOfShape& SectionEdgeFaces(const TopoDS_Edge& SecE) const;
116 Standard_EXPORT void Inter3D(const TopoDS_Face& F1,const TopoDS_Face& F2,TopTools_ListOfShape& LInt) ;
117 Standard_EXPORT void StorePart3d(const TopoDS_Face& F1,const TopoDS_Face& F2,const TopTools_ListOfShape& LInt1) ;
118 Standard_EXPORT void SetDone(const TopoDS_Face& F1,const TopoDS_Face& F2) ;
119 Standard_EXPORT void Affiche(const TopTools_ListOfShape& SetOfFaces) const;
124 Handle_BRepAlgo_AsDes myAsDes;
125 TopTools_DataMapOfShapeListOfShape myDone;
126 TopTools_MapOfShape myTouched;
127 TopTools_MapOfShape myNewEdges;
128 Handle_BRepAlgo_AsDes mySectionEdgesAD;
129 TopTools_DataMapOfShapeListOfShape mySameDomainFM;
130 TopTools_DataMapOfShapeShape mySameDomainVM;
139 // other Inline functions and methods (like "C++: function call" methods)