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