Version: 8.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
GEOMAlgo_ShapeInfoFiller.hxx
Go to the documentation of this file.
1 // Copyright (C) 2007-2016 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, or (at your option) any later version.
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 
20 #ifndef _GEOMAlgo_ShapeInfoFiller_HeaderFile
21 #define _GEOMAlgo_ShapeInfoFiller_HeaderFile
22 
23 #include <Standard.hxx>
24 #include <Standard_Macro.hxx>
25 #include <Standard_Real.hxx>
26 
27 #include <gp_Pln.hxx>
28 #include <gp_Sphere.hxx>
29 #include <gp_Cylinder.hxx>
30 #include <gp_Cone.hxx>
31 #include <gp_Torus.hxx>
32 
33 #include <GeomAbs_CurveType.hxx>
34 #include <GeomAbs_SurfaceType.hxx>
35 
36 #include <TopoDS_Solid.hxx>
37 #include <TopoDS_Shape.hxx>
38 #include <TopoDS_Face.hxx>
39 
40 #include <GEOMAlgo_ShapeInfo.hxx>
42 #include <GEOMAlgo_Algo.hxx>
43 
44 //=======================================================================
45 //class : GEOMAlgo_ShapeInfoFiller
46 //purpose :
47 //=======================================================================
49 {
50  public:
51  Standard_EXPORT
53 
54  Standard_EXPORT
55  virtual ~GEOMAlgo_ShapeInfoFiller();
56 
57  Standard_EXPORT
58  void SetShape(const TopoDS_Shape& aS) ;
59 
60  Standard_EXPORT
61  const TopoDS_Shape& Shape() const;
62 
63  Standard_EXPORT
64  void SetTolerance(const Standard_Real aT) ;
65 
66  Standard_EXPORT
67  Standard_Real Tolerance() const;
68 
69  Standard_EXPORT
70  const GEOMAlgo_ShapeInfo& Info() const;
71 
72  Standard_EXPORT
73  const GEOMAlgo_ShapeInfo& Info(const TopoDS_Shape& aS) const;
74 
75  Standard_EXPORT
76  virtual void Perform() ;
77 
78  protected:
79  Standard_EXPORT
80  virtual void CheckData() ;
81 
82  Standard_EXPORT
83  void FillNbSubShapes(const TopoDS_Shape& aS,GEOMAlgo_ShapeInfo& aInfo) ;
84 
85  Standard_EXPORT
86  void FillSubShapes(const TopoDS_Shape& aS) ;
87 
88  Standard_EXPORT
89  void FillShape(const TopoDS_Shape& aS) ;
90 
91  Standard_EXPORT
92  void FillVertex(const TopoDS_Shape& aS) ;
93 
94  Standard_EXPORT
95  void FillEdge(const TopoDS_Shape& aS) ;
96 
97  Standard_EXPORT
98  void FillFace(const TopoDS_Shape& aS) ;
99 
100  Standard_EXPORT
101  void FillSolid(const TopoDS_Shape& aS) ;
102 
103  Standard_EXPORT
104  void FillContainer(const TopoDS_Shape& aS) ;
105 
106  Standard_EXPORT
107  void FillDetails(const TopoDS_Face& aF,const gp_Pln& aPln) ;
108 
109  Standard_EXPORT
110  void FillDetails(const TopoDS_Face& aF,const gp_Sphere& aSph) ;
111 
112  Standard_EXPORT
113  void FillDetails(const TopoDS_Face& aF,const gp_Cylinder& aCyl) ;
114 
115  Standard_EXPORT
116  void FillDetails(const TopoDS_Face& aF,const gp_Cone& aCone) ;
117 
118  Standard_EXPORT
119  void FillDetails(const TopoDS_Face& aF,const gp_Torus& aTorus) ;
120 
121  Standard_EXPORT
122  void FillDetails(const TopoDS_Solid& aS) ;
123 
124  //modified by NIZNHY-PKV Tue Jul 03 13:31:43 2012f
125  Standard_EXPORT
126  Standard_Boolean TreatStepSphere(const TopoDS_Solid& aS);
127 
128  Standard_EXPORT static
129  Standard_Boolean IsAllowedType(const GeomAbs_CurveType aCT);
130 
131  Standard_EXPORT static
132  Standard_Boolean IsAllowedType(const GeomAbs_SurfaceType aST);
133 
134  Standard_EXPORT static
135  Standard_Integer NbWires(const TopoDS_Face& aF);
136 
137  Standard_EXPORT static
138  Standard_Integer NbShells(const TopoDS_Solid& aS);
139  //modified by NIZNHY-PKV Tue Jul 03 13:31:49 2012t
140 
141  TopoDS_Shape myShape;
144  Standard_Real myTolerance;
145 };
146 
147 #endif