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 <Standard_Real.hxx>
27 #include <gp_Sphere.hxx>
28 #include <gp_Cylinder.hxx>
29 #include <gp_Cone.hxx>
30 #include <gp_Torus.hxx>
32 #include <GeomAbs_CurveType.hxx>
33 #include <GeomAbs_SurfaceType.hxx>
35 #include <TopoDS_Solid.hxx>
36 #include <TopoDS_Shape.hxx>
37 #include <TopoDS_Face.hxx>
39 #include <GEOMAlgo_ShapeInfo.hxx>
40 #include <GEOMAlgo_IndexedDataMapOfShapeShapeInfo.hxx>
41 #include <GEOMAlgo_Algo.hxx>
43 //=======================================================================
44 //class : GEOMAlgo_ShapeInfoFiller
46 //=======================================================================
47 class GEOMAlgo_ShapeInfoFiller : public GEOMAlgo_Algo
51 GEOMAlgo_ShapeInfoFiller();
54 virtual ~GEOMAlgo_ShapeInfoFiller();
57 void SetShape(const TopoDS_Shape& aS) ;
60 const TopoDS_Shape& Shape() const;
63 void SetTolerance(const Standard_Real aT) ;
66 Standard_Real Tolerance() const;
69 const GEOMAlgo_ShapeInfo& Info() const;
72 const GEOMAlgo_ShapeInfo& Info(const TopoDS_Shape& aS) const;
75 virtual void Perform() ;
79 virtual void CheckData() ;
82 void FillNbSubShapes(const TopoDS_Shape& aS,GEOMAlgo_ShapeInfo& aInfo) ;
85 void FillSubShapes(const TopoDS_Shape& aS) ;
88 void FillShape(const TopoDS_Shape& aS) ;
91 void FillVertex(const TopoDS_Shape& aS) ;
94 void FillEdge(const TopoDS_Shape& aS) ;
97 void FillFace(const TopoDS_Shape& aS) ;
100 void FillSolid(const TopoDS_Shape& aS) ;
103 void FillContainer(const TopoDS_Shape& aS) ;
106 void FillDetails(const TopoDS_Face& aF,const gp_Pln& aPln) ;
109 void FillDetails(const TopoDS_Face& aF,const gp_Sphere& aSph) ;
112 void FillDetails(const TopoDS_Face& aF,const gp_Cylinder& aCyl) ;
115 void FillDetails(const TopoDS_Face& aF,const gp_Cone& aCone) ;
118 void FillDetails(const TopoDS_Face& aF,const gp_Torus& aTorus) ;
121 void FillDetails(const TopoDS_Solid& aS) ;
123 //modified by NIZNHY-PKV Tue Jul 03 13:31:43 2012f
125 Standard_Boolean TreatStepSphere(const TopoDS_Solid& aS);
127 Standard_EXPORT static
128 Standard_Boolean IsAllowedType(const GeomAbs_CurveType aCT);
130 Standard_EXPORT static
131 Standard_Boolean IsAllowedType(const GeomAbs_SurfaceType aST);
133 Standard_EXPORT static
134 Standard_Integer NbWires(const TopoDS_Face& aF);
136 Standard_EXPORT static
137 Standard_Integer NbShells(const TopoDS_Solid& aS);
138 //modified by NIZNHY-PKV Tue Jul 03 13:31:49 2012t
140 TopoDS_Shape myShape;
141 GEOMAlgo_ShapeInfo myEmptyInfo;
142 GEOMAlgo_IndexedDataMapOfShapeShapeInfo myMapInfo;
143 Standard_Real myTolerance;