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_Spliter.hxx
28 #ifndef _Partition_Spliter_HeaderFile
29 #define _Partition_Spliter_HeaderFile
31 #ifndef _TopAbs_ShapeEnum_HeaderFile
32 #include <TopAbs_ShapeEnum.hxx>
34 #ifndef _TopoDS_Compound_HeaderFile
35 #include <TopoDS_Compound.hxx>
37 #ifndef _BRep_Builder_HeaderFile
38 #include <BRep_Builder.hxx>
40 #ifndef _TopTools_ListOfShape_HeaderFile
41 #include <TopTools_ListOfShape.hxx>
43 #ifndef _TopTools_MapOfShape_HeaderFile
44 #include <TopTools_MapOfShape.hxx>
46 #ifndef _TopTools_DataMapOfShapeShape_HeaderFile
47 #include <TopTools_DataMapOfShapeShape.hxx>
49 #ifndef _Handle_BRepAlgo_AsDes_HeaderFile
50 #include <Handle_BRepAlgo_AsDes.hxx>
52 #ifndef _BRepAlgo_Image_HeaderFile
53 #include <BRepAlgo_Image.hxx>
55 #ifndef _Partition_Inter3d_HeaderFile
56 #include "Partition_Inter3d.hxx"
58 #ifndef _TopTools_MapOfOrientedShape_HeaderFile
59 #include <TopTools_MapOfOrientedShape.hxx>
61 #ifndef _Standard_Boolean_HeaderFile
62 #include <Standard_Boolean.hxx>
66 class TopTools_ListOfShape;
70 #ifndef _Standard_HeaderFile
71 #include <Standard.hxx>
73 #ifndef _Standard_Macro_HeaderFile
74 #include <Standard_Macro.hxx>
77 class Partition_Spliter {
81 void* operator new(size_t,void* anAddress)
85 void* operator new(size_t size)
87 return Standard::Allocate(size);
89 void operator delete(void *anAddress)
91 if (anAddress) Standard::Free((Standard_Address&)anAddress);
95 Standard_EXPORT Partition_Spliter();
96 Standard_EXPORT void AddShape(const TopoDS_Shape& S) ;
97 Standard_EXPORT void AddTool(const TopoDS_Shape& S) ;
98 Standard_EXPORT void Compute(const TopAbs_ShapeEnum Limit = TopAbs_SHAPE) ;
99 Standard_EXPORT void KeepShapesInside(const TopoDS_Shape& S) ;
100 Standard_EXPORT void RemoveShapesInside(const TopoDS_Shape& S) ;
101 Standard_EXPORT TopoDS_Shape Shape() const;
102 Standard_EXPORT void Clear() ;
122 Standard_EXPORT void MakeShells(const TopoDS_Shape& S,TopTools_ListOfShape& NS) ;
123 Standard_EXPORT TopoDS_Shape MakeFaces(const TopoDS_Shape& S) ;
124 Standard_EXPORT void MakeEdges(const TopoDS_Edge& E,const TopTools_ListOfShape& VOnE,TopTools_ListOfShape& NE) const;
125 Standard_EXPORT TopoDS_Shape FindFacesInside(const TopoDS_Shape& S,const Standard_Boolean CheckClosed = Standard_False,const Standard_Boolean All = Standard_False) ;
126 Standard_EXPORT Standard_Boolean CheckTool(const TopoDS_Shape& S) ;
127 Standard_EXPORT void MergeEqualEdges(const TopTools_ListOfShape& LE) ;
132 TopAbs_ShapeEnum myDoneStep;
133 TopoDS_Compound myShape;
134 BRep_Builder myBuilder;
135 TopTools_ListOfShape myListShapes;
136 TopTools_MapOfShape myMapFaces;
137 TopTools_MapOfShape myMapTools;
138 TopTools_DataMapOfShapeShape myFaceShapeMap;
139 TopTools_MapOfShape myNewSection;
140 Handle_BRepAlgo_AsDes myAsDes;
141 BRepAlgo_Image myImagesFaces;
142 BRepAlgo_Image myImagesEdges;
143 BRepAlgo_Image myImageShape;
144 Partition_Inter3d myInter3d;
145 TopTools_MapOfOrientedShape myAddedFacesMap;
146 TopTools_MapOfShape myEqualEdges;
147 TopTools_DataMapOfShapeShape myInternalFaces;
148 TopTools_DataMapOfShapeShape myIntNotClFaces;
157 // other Inline functions and methods (like "C++: function call" methods)