1 // Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 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.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 // GEOM PARTITION : partition algorithm
23 // File : Partition_Inter3d.hxx
26 #ifndef _Partition_Inter3d_HeaderFile
27 #define _Partition_Inter3d_HeaderFile
29 #ifndef _Handle_BRepAlgo_AsDes_HeaderFile
30 #include <Handle_BRepAlgo_AsDes.hxx>
32 #ifndef _TopTools_DataMapOfShapeListOfShape_HeaderFile
33 #include <TopTools_DataMapOfShapeListOfShape.hxx>
35 #ifndef _TopTools_MapOfShape_HeaderFile
36 #include <TopTools_MapOfShape.hxx>
38 #ifndef _TopTools_DataMapOfShapeShape_HeaderFile
39 #include <TopTools_DataMapOfShapeShape.hxx>
41 #ifndef _Standard_Boolean_HeaderFile
42 #include <Standard_Boolean.hxx>
45 class TopTools_ListOfShape;
46 class TopTools_DataMapOfShapeShape;
48 class TopTools_MapOfShape;
54 #ifndef _Standard_HeaderFile
55 #include <Standard.hxx>
57 #ifndef _Standard_Macro_HeaderFile
58 #include <Standard_Macro.hxx>
61 class Partition_Inter3d {
65 void* operator new(size_t,void* anAddress)
69 void* operator new(size_t size)
71 return Standard::Allocate(size);
73 void operator delete(void *anAddress)
75 if (anAddress) Standard::Free((Standard_Address&)anAddress);
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;
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;
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;
138 // other Inline functions and methods (like "C++: function call" methods)