1 // Copyright (C) 2007-2012 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
19 #ifndef _GEOMAlgo_ShapeInfoFiller_HeaderFile
20 #define _GEOMAlgo_ShapeInfoFiller_HeaderFile
22 #include <Standard.hxx>
23 #include <Standard_Macro.hxx>
24 #include <TopoDS_Shape.hxx>
25 #include <GEOMAlgo_ShapeInfo.hxx>
26 #include <GEOMAlgo_IndexedDataMapOfShapeShapeInfo.hxx>
27 #include <Standard_Real.hxx>
28 #include <GEOMAlgo_Algo.hxx>
29 #include <TopoDS_Face.hxx>
31 #include <gp_Sphere.hxx>
32 #include <gp_Cylinder.hxx>
33 #include <gp_Cone.hxx>
34 #include <gp_Torus.hxx>
35 #include <TopoDS_Solid.hxx>
37 //=======================================================================
38 //class : GEOMAlgo_ShapeInfoFiller
40 //=======================================================================
41 class GEOMAlgo_ShapeInfoFiller : public GEOMAlgo_Algo
45 GEOMAlgo_ShapeInfoFiller();
48 virtual ~GEOMAlgo_ShapeInfoFiller();
51 void SetShape(const TopoDS_Shape& aS) ;
54 const TopoDS_Shape& Shape() const;
57 void SetTolerance(const Standard_Real aT) ;
60 Standard_Real Tolerance() const;
63 const GEOMAlgo_ShapeInfo& Info() const;
66 const GEOMAlgo_ShapeInfo& Info(const TopoDS_Shape& aS) const;
69 virtual void Perform() ;
73 virtual void CheckData() ;
76 void FillNbSubShapes(const TopoDS_Shape& aS,GEOMAlgo_ShapeInfo& aInfo) ;
79 void FillSubShapes(const TopoDS_Shape& aS) ;
82 void FillShape(const TopoDS_Shape& aS) ;
85 void FillVertex(const TopoDS_Shape& aS) ;
88 void FillEdge(const TopoDS_Shape& aS) ;
91 void FillFace(const TopoDS_Shape& aS) ;
94 void FillSolid(const TopoDS_Shape& aS) ;
97 void FillContainer(const TopoDS_Shape& aS) ;
100 void FillDetails(const TopoDS_Face& aF,const gp_Pln& aPln) ;
103 void FillDetails(const TopoDS_Face& aF,const gp_Sphere& aSph) ;
106 void FillDetails(const TopoDS_Face& aF,const gp_Cylinder& aCyl) ;
109 void FillDetails(const TopoDS_Face& aF,const gp_Cone& aCone) ;
112 void FillDetails(const TopoDS_Face& aF,const gp_Torus& aTorus) ;
115 void FillDetails(const TopoDS_Solid& aS) ;
118 TopoDS_Shape myShape;
119 GEOMAlgo_ShapeInfo myEmptyInfo;
120 GEOMAlgo_IndexedDataMapOfShapeShapeInfo myMapInfo;
121 Standard_Real myTolerance;