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 #ifndef _NMTAlgo_Splitter_HeaderFile
23 #define _NMTAlgo_Splitter_HeaderFile
25 #ifndef _TopAbs_ShapeEnum_HeaderFile
26 #include <TopAbs_ShapeEnum.hxx>
28 #ifndef _BRep_Builder_HeaderFile
29 #include <BRep_Builder.hxx>
31 #ifndef _TopTools_ListOfShape_HeaderFile
32 #include <TopTools_ListOfShape.hxx>
34 #ifndef _TopTools_MapOfShape_HeaderFile
35 #include <TopTools_MapOfShape.hxx>
37 #ifndef _TopTools_DataMapOfShapeShape_HeaderFile
38 #include <TopTools_DataMapOfShapeShape.hxx>
40 #ifndef _BRepAlgo_Image_HeaderFile
41 #include <BRepAlgo_Image.hxx>
43 #ifndef _TopTools_MapOfOrientedShape_HeaderFile
44 #include <TopTools_MapOfOrientedShape.hxx>
46 #ifndef _TopTools_DataMapOfShapeListOfShape_HeaderFile
47 #include <TopTools_DataMapOfShapeListOfShape.hxx>
49 #ifndef _NMTAlgo_Builder_HeaderFile
50 #include <NMTAlgo_Builder.hxx>
52 #ifndef _Standard_Boolean_HeaderFile
53 #include <Standard_Boolean.hxx>
56 class NMTTools_DSFiller;
57 class TopTools_ListOfShape;
60 #ifndef _Standard_HeaderFile
61 #include <Standard.hxx>
63 #ifndef _Standard_Macro_HeaderFile
64 #include <Standard_Macro.hxx>
67 class NMTAlgo_Splitter : public NMTAlgo_Builder {
71 void* operator new(size_t,void* anAddress)
75 void* operator new(size_t size)
77 return Standard::Allocate(size);
79 void operator delete(void *anAddress)
81 if (anAddress) Standard::Free((Standard_Address&)anAddress);
85 Standard_EXPORT NMTAlgo_Splitter();
86 Standard_EXPORT virtual ~NMTAlgo_Splitter();
87 Standard_EXPORT virtual void AddShape(const TopoDS_Shape& S) ;
88 Standard_EXPORT virtual void AddTool(const TopoDS_Shape& S) ;
89 Standard_EXPORT virtual void Compute() ;
90 Standard_EXPORT virtual void Build(const TopAbs_ShapeEnum aLimit = TopAbs_SHAPE) ;
91 Standard_EXPORT virtual void ComputeWithFiller(const NMTTools_DSFiller& aDSF) ;
92 Standard_EXPORT void KeepShapesInside(const TopoDS_Shape& S) ;
93 Standard_EXPORT void RemoveShapesInside(const TopoDS_Shape& S) ;
94 Standard_EXPORT const TopTools_ListOfShape& Modified(const TopoDS_Shape& S) ;
95 Standard_EXPORT const TopTools_ListOfShape& Generated(const TopoDS_Shape& S) ;
96 Standard_EXPORT Standard_Boolean IsDeleted(const TopoDS_Shape& S) ;
97 Standard_EXPORT virtual void Clear() ;
98 Standard_EXPORT const TopTools_ListOfShape& SourceShapes() const;
108 Standard_EXPORT void FillResult() ;
109 Standard_EXPORT void FillImageShape() ;
110 Standard_EXPORT void SplittedFaces() ;
111 Standard_EXPORT void SplittedWires() ;
112 Standard_EXPORT void SplitsAndSections() ;
113 Standard_EXPORT void ShellsAndSolids() ;
114 Standard_EXPORT void MakeShells(const TopoDS_Shape& aS,TopTools_ListOfShape& aLNS) ;
115 Standard_EXPORT void MakeSolids(const TopoDS_Shape& Solid,TopTools_ListOfShape& Shells) ;
116 Standard_EXPORT TopoDS_Shape FindFacesInside(const TopoDS_Shape& S,const Standard_Boolean CheckClosed = Standard_False,const Standard_Boolean All = Standard_False) ;
117 Standard_EXPORT static Standard_Boolean IsInside(const TopoDS_Shape& S1,const TopoDS_Shape& S2) ;
118 Standard_EXPORT TopoDS_Shape GetOriginalShape(const TopoDS_Shape& aShape) const;
119 Standard_EXPORT void FindImage(const TopoDS_Shape& aS,TopTools_ListOfShape& aLIms) ;
124 TopAbs_ShapeEnum myDoneStep;
125 BRep_Builder myBuilder;
126 TopTools_ListOfShape myListShapes;
127 TopTools_MapOfShape myMapFaces;
128 TopTools_MapOfShape myMapTools;
129 TopTools_MapOfShape myEqualEdges;
130 TopTools_MapOfShape myNewSection;
131 TopTools_MapOfShape myClosedShapes;
132 TopTools_MapOfShape myWrappingSolid;
133 TopTools_DataMapOfShapeShape myFaceShapeMap;
134 TopTools_DataMapOfShapeShape myInternalFaces;
135 TopTools_DataMapOfShapeShape myIntNotClFaces;
136 BRepAlgo_Image myImageShape;
137 TopTools_MapOfOrientedShape myAddedFacesMap;
138 TopTools_ListOfShape mySourceShapes;
139 TopAbs_ShapeEnum myLimit;
140 TopTools_MapOfShape myToolShapes;
141 TopTools_MapOfShape myObjShapes;
142 TopTools_DataMapOfShapeShape myMapSIFC;
143 TopTools_ListOfShape myGenerated;
144 TopTools_DataMapOfShapeListOfShape myModifiedFaces;
163 // other Inline functions and methods (like "C++: function call" methods)