1 // Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
\r
3 // This library is free software; you can redistribute it and/or
\r
4 // modify it under the terms of the GNU Lesser General Public
\r
5 // License as published by the Free Software Foundation; either
\r
6 // version 2.1 of the License.
\r
8 // This library is distributed in the hope that it will be useful,
\r
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
\r
11 // Lesser General Public License for more details.
\r
13 // You should have received a copy of the GNU Lesser General Public
\r
14 // License along with this library; if not, write to the Free Software
\r
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
\r
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
\r
19 #ifndef _GEOMAlgo_ShapeInfoFiller_HeaderFile
\r
20 #define _GEOMAlgo_ShapeInfoFiller_HeaderFile
\r
22 #include <Standard.hxx>
\r
23 #include <Standard_Macro.hxx>
\r
24 #include <TopoDS_Shape.hxx>
\r
25 #include <GEOMAlgo_ShapeInfo.hxx>
\r
26 #include <GEOMAlgo_IndexedDataMapOfShapeShapeInfo.hxx>
\r
27 #include <Standard_Real.hxx>
\r
28 #include <GEOMAlgo_Algo.hxx>
\r
29 #include <TopoDS_Face.hxx>
\r
30 #include <gp_Pln.hxx>
\r
31 #include <gp_Sphere.hxx>
\r
32 #include <gp_Cylinder.hxx>
\r
33 #include <gp_Cone.hxx>
\r
34 #include <gp_Torus.hxx>
\r
35 #include <TopoDS_Solid.hxx>
\r
37 //=======================================================================
\r
38 //class : GEOMAlgo_ShapeInfoFiller
\r
40 //=======================================================================
\r
41 class GEOMAlgo_ShapeInfoFiller : public GEOMAlgo_Algo
\r
45 GEOMAlgo_ShapeInfoFiller();
\r
48 virtual ~GEOMAlgo_ShapeInfoFiller();
\r
51 void SetShape(const TopoDS_Shape& aS) ;
\r
54 const TopoDS_Shape& Shape() const;
\r
57 void SetTolerance(const Standard_Real aT) ;
\r
60 Standard_Real Tolerance() const;
\r
63 const GEOMAlgo_ShapeInfo& Info() const;
\r
66 const GEOMAlgo_ShapeInfo& Info(const TopoDS_Shape& aS) const;
\r
69 virtual void Perform() ;
\r
73 virtual void CheckData() ;
\r
76 void FillNbSubShapes(const TopoDS_Shape& aS,GEOMAlgo_ShapeInfo& aInfo) ;
\r
79 void FillSubShapes(const TopoDS_Shape& aS) ;
\r
82 void FillShape(const TopoDS_Shape& aS) ;
\r
85 void FillVertex(const TopoDS_Shape& aS) ;
\r
88 void FillEdge(const TopoDS_Shape& aS) ;
\r
91 void FillFace(const TopoDS_Shape& aS) ;
\r
94 void FillSolid(const TopoDS_Shape& aS) ;
\r
97 void FillContainer(const TopoDS_Shape& aS) ;
\r
100 void FillDetails(const TopoDS_Face& aF,const gp_Pln& aPln) ;
\r
103 void FillDetails(const TopoDS_Face& aF,const gp_Sphere& aSph) ;
\r
106 void FillDetails(const TopoDS_Face& aF,const gp_Cylinder& aCyl) ;
\r
109 void FillDetails(const TopoDS_Face& aF,const gp_Cone& aCone) ;
\r
112 void FillDetails(const TopoDS_Face& aF,const gp_Torus& aTorus) ;
\r
115 void FillDetails(const TopoDS_Solid& aS) ;
\r
118 TopoDS_Shape myShape;
\r
119 GEOMAlgo_ShapeInfo myEmptyInfo;
\r
120 GEOMAlgo_IndexedDataMapOfShapeShapeInfo myMapInfo;
\r
121 Standard_Real myTolerance;
\r