1 // Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either
7 // version 2.1 of the License.
9 // This library is distributed in the hope that it will be useful
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // Lesser General Public License for more details.
14 // You should have received a copy of the GNU Lesser General Public
15 // License along with this library; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 // GEOM PARTITION : partition algorithm
22 // File : Partition_Spliter.hxx
25 #ifndef _Partition_Spliter_HeaderFile
26 #define _Partition_Spliter_HeaderFile
28 #ifndef _TopAbs_ShapeEnum_HeaderFile
29 #include <TopAbs_ShapeEnum.hxx>
31 #ifndef _TopoDS_Compound_HeaderFile
32 #include <TopoDS_Compound.hxx>
34 #ifndef _BRep_Builder_HeaderFile
35 #include <BRep_Builder.hxx>
37 #ifndef _TopTools_ListOfShape_HeaderFile
38 #include <TopTools_ListOfShape.hxx>
40 #ifndef _TopTools_MapOfShape_HeaderFile
41 #include <TopTools_MapOfShape.hxx>
43 #ifndef _TopTools_DataMapOfShapeShape_HeaderFile
44 #include <TopTools_DataMapOfShapeShape.hxx>
46 #ifndef _Handle_BRepAlgo_AsDes_HeaderFile
47 #include <Handle_BRepAlgo_AsDes.hxx>
49 #ifndef _BRepAlgo_Image_HeaderFile
50 #include <BRepAlgo_Image.hxx>
52 #ifndef _Partition_Inter3d_HeaderFile
53 #include "Partition_Inter3d.hxx"
55 #ifndef _TopTools_MapOfOrientedShape_HeaderFile
56 #include <TopTools_MapOfOrientedShape.hxx>
58 #ifndef _Standard_Boolean_HeaderFile
59 #include <Standard_Boolean.hxx>
63 class TopTools_ListOfShape;
67 #ifndef _Standard_HeaderFile
68 #include <Standard.hxx>
70 #ifndef _Standard_Macro_HeaderFile
71 #include <Standard_Macro.hxx>
74 class Partition_Spliter {
78 void* operator new(size_t,void* anAddress)
82 void* operator new(size_t size)
84 return Standard::Allocate(size);
86 void operator delete(void *anAddress)
88 if (anAddress) Standard::Free((Standard_Address&)anAddress);
92 Standard_EXPORT Partition_Spliter();
93 Standard_EXPORT void AddShape(const TopoDS_Shape& S) ;
94 Standard_EXPORT void AddTool(const TopoDS_Shape& S) ;
95 Standard_EXPORT void Compute(const TopAbs_ShapeEnum Limit = TopAbs_SHAPE) ;
96 Standard_EXPORT void KeepShapesInside(const TopoDS_Shape& S) ;
97 Standard_EXPORT void RemoveShapesInside(const TopoDS_Shape& S) ;
98 Standard_EXPORT TopoDS_Shape Shape() const;
99 Standard_EXPORT void Clear() ;
119 Standard_EXPORT void MakeSolids(const TopoDS_Shape& Solid,TopTools_ListOfShape& Shells) ;
120 Standard_EXPORT void MakeShells(const TopoDS_Shape& S,TopTools_ListOfShape& NS) ;
121 Standard_EXPORT TopoDS_Shape MakeFaces(const TopoDS_Shape& S) ;
122 Standard_EXPORT void MakeEdges(const TopoDS_Edge& E,const TopTools_ListOfShape& VOnE,TopTools_ListOfShape& NE) const;
123 Standard_EXPORT TopoDS_Shape FindFacesInside(const TopoDS_Shape& S,const Standard_Boolean CheckClosed = Standard_False,const Standard_Boolean All = Standard_False) ;
124 Standard_EXPORT Standard_Boolean CheckTool(const TopoDS_Shape& S) ;
125 Standard_EXPORT void MergeEqualEdges(const TopTools_ListOfShape& LE) ;
126 Standard_EXPORT static Standard_Boolean IsInside(const TopoDS_Shape& S1,const TopoDS_Shape& S2) ;
127 Standard_EXPORT TopoDS_Shape GetOriginalShape(const TopoDS_Shape& aShape) const;
128 Standard_EXPORT void FindToolsToReconstruct() ;
133 TopAbs_ShapeEnum myDoneStep;
134 TopoDS_Compound myShape;
135 BRep_Builder myBuilder;
136 TopTools_ListOfShape myListShapes;
137 TopTools_MapOfShape myMapFaces;
138 TopTools_MapOfShape myMapTools;
139 TopTools_MapOfShape myEqualEdges;
140 TopTools_MapOfShape myNewSection;
141 TopTools_MapOfShape myClosedShapes;
142 TopTools_MapOfShape mySharedFaces;
143 TopTools_MapOfShape myWrappingSolid;
144 TopTools_DataMapOfShapeShape myFaceShapeMap;
145 TopTools_DataMapOfShapeShape myInternalFaces;
146 TopTools_DataMapOfShapeShape myIntNotClFaces;
147 Handle_BRepAlgo_AsDes myAsDes;
148 BRepAlgo_Image myImagesFaces;
149 BRepAlgo_Image myImagesEdges;
150 BRepAlgo_Image myImageShape;
151 Partition_Inter3d myInter3d;
152 TopTools_MapOfOrientedShape myAddedFacesMap;
161 // other Inline functions and methods (like "C++: function call" methods)