1 // Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 #ifndef _GEOMAlgo_ShapeInfoFiller_HeaderFile
21 #define _GEOMAlgo_ShapeInfoFiller_HeaderFile
23 #ifndef _TopoDS_Shape_HeaderFile
24 #include <TopoDS_Shape.hxx>
26 #ifndef _GEOMAlgo_ShapeInfo_HeaderFile
27 #include <GEOMAlgo_ShapeInfo.hxx>
29 #ifndef _GEOMAlgo_IndexedDataMapOfShapeShapeInfo_HeaderFile
30 #include <GEOMAlgo_IndexedDataMapOfShapeShapeInfo.hxx>
32 #ifndef _Standard_Real_HeaderFile
33 #include <Standard_Real.hxx>
35 #ifndef _GEOMAlgo_Algo_HeaderFile
36 #include <GEOMAlgo_Algo.hxx>
39 class GEOMAlgo_ShapeInfo;
49 #ifndef _Standard_HeaderFile
50 #include <Standard.hxx>
52 #ifndef _Standard_Macro_HeaderFile
53 #include <Standard_Macro.hxx>
57 class GEOMAlgo_ShapeInfoFiller : public GEOMAlgo_Algo {
61 void* operator new(size_t,void* anAddress)
65 void* operator new(size_t size)
67 return Standard::Allocate(size);
69 void operator delete(void *anAddress)
71 if (anAddress) Standard::Free((Standard_Address&)anAddress);
77 Standard_EXPORT GEOMAlgo_ShapeInfoFiller();
78 Standard_EXPORT virtual ~GEOMAlgo_ShapeInfoFiller();
81 Standard_EXPORT void SetShape(const TopoDS_Shape& aS) ;
84 Standard_EXPORT const TopoDS_Shape& Shape() const;
87 Standard_EXPORT void SetTolerance(const Standard_Real aT) ;
90 Standard_EXPORT Standard_Real Tolerance() const;
93 Standard_EXPORT const GEOMAlgo_ShapeInfo& Info() const;
96 Standard_EXPORT const GEOMAlgo_ShapeInfo& Info(const TopoDS_Shape& aS) const;
99 Standard_EXPORT virtual void Perform() ;
111 Standard_EXPORT virtual void CheckData() ;
114 Standard_EXPORT void FillNbSubShapes(const TopoDS_Shape& aS,GEOMAlgo_ShapeInfo& aInfo) ;
117 Standard_EXPORT void FillSubShapes(const TopoDS_Shape& aS) ;
120 Standard_EXPORT void FillShape(const TopoDS_Shape& aS) ;
123 Standard_EXPORT void FillVertex(const TopoDS_Shape& aS) ;
126 Standard_EXPORT void FillEdge(const TopoDS_Shape& aS) ;
129 Standard_EXPORT void FillFace(const TopoDS_Shape& aS) ;
132 Standard_EXPORT void FillSolid(const TopoDS_Shape& aS) ;
135 Standard_EXPORT void FillContainer(const TopoDS_Shape& aS) ;
138 Standard_EXPORT void FillDetails(const TopoDS_Face& aF,const gp_Pln& aPln) ;
141 Standard_EXPORT void FillDetails(const TopoDS_Face& aF,const gp_Sphere& aSph) ;
144 Standard_EXPORT void FillDetails(const TopoDS_Face& aF,const gp_Cylinder& aCyl) ;
147 Standard_EXPORT void FillDetails(const TopoDS_Face& aF,const gp_Cone& aCone) ;
150 Standard_EXPORT void FillDetails(const TopoDS_Face& aF,const gp_Torus& aTorus) ;
153 Standard_EXPORT void FillDetails(const TopoDS_Solid& aS) ;
158 TopoDS_Shape myShape;
159 GEOMAlgo_ShapeInfo myEmptyInfo;
160 GEOMAlgo_IndexedDataMapOfShapeShapeInfo myMapInfo;
161 Standard_Real myTolerance;
180 // other Inline functions and methods (like "C++: function call" methods)