Salome HOME
IPAL22903: TC650: Store/Restore last GUI state does not work for Isos
[modules/geom.git] / src / GEOMAlgo_NEW / GEOMAlgo_ShapeInfoFiller.hxx
1 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
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.
7 //
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.
12 //
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
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19 #ifndef _GEOMAlgo_ShapeInfoFiller_HeaderFile
20 #define _GEOMAlgo_ShapeInfoFiller_HeaderFile
21
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>
30 #include <gp_Pln.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>
36
37 //=======================================================================
38 //class    : GEOMAlgo_ShapeInfoFiller
39 //purpose  :
40 //=======================================================================
41 class GEOMAlgo_ShapeInfoFiller  : public GEOMAlgo_Algo
42 {
43  public:
44   Standard_EXPORT
45     GEOMAlgo_ShapeInfoFiller();
46
47   Standard_EXPORT
48     virtual ~GEOMAlgo_ShapeInfoFiller();
49
50   Standard_EXPORT
51     void SetShape(const TopoDS_Shape& aS) ;
52
53   Standard_EXPORT
54     const TopoDS_Shape& Shape() const;
55
56   Standard_EXPORT
57     void SetTolerance(const Standard_Real aT) ;
58
59   Standard_EXPORT
60     Standard_Real Tolerance() const;
61
62   Standard_EXPORT
63     const GEOMAlgo_ShapeInfo& Info() const;
64
65   Standard_EXPORT
66     const GEOMAlgo_ShapeInfo& Info(const TopoDS_Shape& aS) const;
67
68   Standard_EXPORT
69     virtual  void Perform() ;
70
71  protected:
72   Standard_EXPORT
73     virtual  void CheckData() ;
74
75   Standard_EXPORT
76     void FillNbSubShapes(const TopoDS_Shape& aS,GEOMAlgo_ShapeInfo& aInfo) ;
77
78   Standard_EXPORT
79     void FillSubShapes(const TopoDS_Shape& aS) ;
80
81   Standard_EXPORT
82     void FillShape(const TopoDS_Shape& aS) ;
83
84   Standard_EXPORT
85     void FillVertex(const TopoDS_Shape& aS) ;
86
87   Standard_EXPORT
88     void FillEdge(const TopoDS_Shape& aS) ;
89
90   Standard_EXPORT
91     void FillFace(const TopoDS_Shape& aS) ;
92
93   Standard_EXPORT
94     void FillSolid(const TopoDS_Shape& aS) ;
95
96   Standard_EXPORT
97     void FillContainer(const TopoDS_Shape& aS) ;
98
99   Standard_EXPORT
100     void FillDetails(const TopoDS_Face& aF,const gp_Pln& aPln) ;
101
102   Standard_EXPORT
103     void FillDetails(const TopoDS_Face& aF,const gp_Sphere& aSph) ;
104
105   Standard_EXPORT
106     void FillDetails(const TopoDS_Face& aF,const gp_Cylinder& aCyl) ;
107
108   Standard_EXPORT
109     void FillDetails(const TopoDS_Face& aF,const gp_Cone& aCone) ;
110
111   Standard_EXPORT
112     void FillDetails(const TopoDS_Face& aF,const gp_Torus& aTorus) ;
113
114   Standard_EXPORT
115     void FillDetails(const TopoDS_Solid& aS) ;
116
117
118   TopoDS_Shape myShape;
119   GEOMAlgo_ShapeInfo myEmptyInfo;
120   GEOMAlgo_IndexedDataMapOfShapeShapeInfo myMapInfo;
121   Standard_Real myTolerance;
122 };
123 #endif