1 // Copyright (C) 2007-2014 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, or (at your option) any later version.
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
20 #ifndef _GEOMAlgo_ShapeInfoFiller_HeaderFile
21 #define _GEOMAlgo_ShapeInfoFiller_HeaderFile
23 #include <Standard.hxx>
24 #include <Standard_Macro.hxx>
25 #include <Standard_Real.hxx>
28 #include <gp_Sphere.hxx>
29 #include <gp_Cylinder.hxx>
30 #include <gp_Cone.hxx>
31 #include <gp_Torus.hxx>
33 #include <GeomAbs_CurveType.hxx>
34 #include <GeomAbs_SurfaceType.hxx>
36 #include <TopoDS_Solid.hxx>
37 #include <TopoDS_Shape.hxx>
38 #include <TopoDS_Face.hxx>
40 #include <GEOMAlgo_ShapeInfo.hxx>
41 #include <GEOMAlgo_IndexedDataMapOfShapeShapeInfo.hxx>
42 #include <GEOMAlgo_Algo.hxx>
44 //=======================================================================
45 //class : GEOMAlgo_ShapeInfoFiller
47 //=======================================================================
48 class GEOMAlgo_ShapeInfoFiller : public GEOMAlgo_Algo
52 GEOMAlgo_ShapeInfoFiller();
55 virtual ~GEOMAlgo_ShapeInfoFiller();
58 void SetShape(const TopoDS_Shape& aS) ;
61 const TopoDS_Shape& Shape() const;
64 void SetTolerance(const Standard_Real aT) ;
67 Standard_Real Tolerance() const;
70 const GEOMAlgo_ShapeInfo& Info() const;
73 const GEOMAlgo_ShapeInfo& Info(const TopoDS_Shape& aS) const;
76 virtual void Perform() ;
80 virtual void CheckData() ;
83 void FillNbSubShapes(const TopoDS_Shape& aS,GEOMAlgo_ShapeInfo& aInfo) ;
86 void FillSubShapes(const TopoDS_Shape& aS) ;
89 void FillShape(const TopoDS_Shape& aS) ;
92 void FillVertex(const TopoDS_Shape& aS) ;
95 void FillEdge(const TopoDS_Shape& aS) ;
98 void FillFace(const TopoDS_Shape& aS) ;
101 void FillSolid(const TopoDS_Shape& aS) ;
104 void FillContainer(const TopoDS_Shape& aS) ;
107 void FillDetails(const TopoDS_Face& aF,const gp_Pln& aPln) ;
110 void FillDetails(const TopoDS_Face& aF,const gp_Sphere& aSph) ;
113 void FillDetails(const TopoDS_Face& aF,const gp_Cylinder& aCyl) ;
116 void FillDetails(const TopoDS_Face& aF,const gp_Cone& aCone) ;
119 void FillDetails(const TopoDS_Face& aF,const gp_Torus& aTorus) ;
122 void FillDetails(const TopoDS_Solid& aS) ;
124 //modified by NIZNHY-PKV Tue Jul 03 13:31:43 2012f
126 Standard_Boolean TreatStepSphere(const TopoDS_Solid& aS);
128 Standard_EXPORT static
129 Standard_Boolean IsAllowedType(const GeomAbs_CurveType aCT);
131 Standard_EXPORT static
132 Standard_Boolean IsAllowedType(const GeomAbs_SurfaceType aST);
134 Standard_EXPORT static
135 Standard_Integer NbWires(const TopoDS_Face& aF);
137 Standard_EXPORT static
138 Standard_Integer NbShells(const TopoDS_Solid& aS);
139 //modified by NIZNHY-PKV Tue Jul 03 13:31:49 2012t
141 TopoDS_Shape myShape;
142 GEOMAlgo_ShapeInfo myEmptyInfo;
143 GEOMAlgo_IndexedDataMapOfShapeShapeInfo myMapInfo;
144 Standard_Real myTolerance;