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 #ifndef _NMTAlgo_Splitter_HeaderFile
21 #define _NMTAlgo_Splitter_HeaderFile
23 #ifndef _TopAbs_ShapeEnum_HeaderFile
24 #include <TopAbs_ShapeEnum.hxx>
26 #ifndef _BRep_Builder_HeaderFile
27 #include <BRep_Builder.hxx>
29 #ifndef _TopTools_ListOfShape_HeaderFile
30 #include <TopTools_ListOfShape.hxx>
32 #ifndef _TopTools_MapOfShape_HeaderFile
33 #include <TopTools_MapOfShape.hxx>
35 #ifndef _TopTools_DataMapOfShapeShape_HeaderFile
36 #include <TopTools_DataMapOfShapeShape.hxx>
38 #ifndef _BRepAlgo_Image_HeaderFile
39 #include <BRepAlgo_Image.hxx>
41 #ifndef _TopTools_MapOfOrientedShape_HeaderFile
42 #include <TopTools_MapOfOrientedShape.hxx>
44 #ifndef _TopTools_DataMapOfShapeListOfShape_HeaderFile
45 #include <TopTools_DataMapOfShapeListOfShape.hxx>
47 #ifndef _NMTAlgo_Builder_HeaderFile
48 #include <NMTAlgo_Builder.hxx>
50 #ifndef _Standard_Boolean_HeaderFile
51 #include <Standard_Boolean.hxx>
54 class NMTTools_DSFiller;
55 class TopTools_ListOfShape;
58 #ifndef _Standard_HeaderFile
59 #include <Standard.hxx>
61 #ifndef _Standard_Macro_HeaderFile
62 #include <Standard_Macro.hxx>
65 class NMTAlgo_Splitter : public NMTAlgo_Builder {
69 void* operator new(size_t,void* anAddress)
73 void* operator new(size_t size)
75 return Standard::Allocate(size);
77 void operator delete(void *anAddress)
79 if (anAddress) Standard::Free((Standard_Address&)anAddress);
83 Standard_EXPORT NMTAlgo_Splitter();
84 Standard_EXPORT virtual ~NMTAlgo_Splitter();
85 Standard_EXPORT virtual void AddShape(const TopoDS_Shape& S) ;
86 Standard_EXPORT virtual void AddTool(const TopoDS_Shape& S) ;
87 Standard_EXPORT virtual void Compute() ;
88 Standard_EXPORT virtual void Build(const TopAbs_ShapeEnum aLimit = TopAbs_SHAPE) ;
89 Standard_EXPORT virtual void ComputeWithFiller(const NMTTools_DSFiller& aDSF) ;
90 Standard_EXPORT void KeepShapesInside(const TopoDS_Shape& S) ;
91 Standard_EXPORT void RemoveShapesInside(const TopoDS_Shape& S) ;
92 Standard_EXPORT const TopTools_ListOfShape& Modified(const TopoDS_Shape& S) ;
93 Standard_EXPORT const TopTools_ListOfShape& Generated(const TopoDS_Shape& S) ;
94 Standard_EXPORT Standard_Boolean IsDeleted(const TopoDS_Shape& S) ;
95 Standard_EXPORT virtual void Clear() ;
96 Standard_EXPORT const TopTools_ListOfShape& SourceShapes() const;
106 Standard_EXPORT void FillResult() ;
107 Standard_EXPORT void FillImageShape() ;
108 Standard_EXPORT void SplittedFaces() ;
109 Standard_EXPORT void SplittedWires() ;
110 Standard_EXPORT void SplitsAndSections() ;
111 Standard_EXPORT void ShellsAndSolids() ;
112 Standard_EXPORT void MakeShells(const TopoDS_Shape& aS,TopTools_ListOfShape& aLNS) ;
113 Standard_EXPORT void MakeSolids(const TopoDS_Shape& Solid,TopTools_ListOfShape& Shells) ;
114 Standard_EXPORT TopoDS_Shape FindFacesInside(const TopoDS_Shape& S,const Standard_Boolean CheckClosed = Standard_False,const Standard_Boolean All = Standard_False) ;
115 Standard_EXPORT static Standard_Boolean IsInside(const TopoDS_Shape& S1,const TopoDS_Shape& S2) ;
116 Standard_EXPORT TopoDS_Shape GetOriginalShape(const TopoDS_Shape& aShape) const;
117 Standard_EXPORT void FindImage(const TopoDS_Shape& aS,TopTools_ListOfShape& aLIms) ;
122 TopAbs_ShapeEnum myDoneStep;
123 BRep_Builder myBuilder;
124 TopTools_ListOfShape myListShapes;
125 TopTools_MapOfShape myMapFaces;
126 TopTools_MapOfShape myMapTools;
127 TopTools_MapOfShape myEqualEdges;
128 TopTools_MapOfShape myNewSection;
129 TopTools_MapOfShape myClosedShapes;
130 TopTools_MapOfShape myWrappingSolid;
131 TopTools_DataMapOfShapeShape myFaceShapeMap;
132 TopTools_DataMapOfShapeShape myInternalFaces;
133 TopTools_DataMapOfShapeShape myIntNotClFaces;
134 BRepAlgo_Image myImageShape;
135 TopTools_MapOfOrientedShape myAddedFacesMap;
136 TopTools_ListOfShape mySourceShapes;
137 TopAbs_ShapeEnum myLimit;
138 TopTools_MapOfShape myToolShapes;
139 TopTools_MapOfShape myObjShapes;
140 TopTools_DataMapOfShapeShape myMapSIFC;
141 TopTools_ListOfShape myGenerated;
142 TopTools_DataMapOfShapeListOfShape myModifiedFaces;
161 // other Inline functions and methods (like "C++: function call" methods)