Back to index

salome-geom  6.5.0
GEOMAlgo_ShapeInfoFiller.hxx
Go to the documentation of this file.
00001 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
00002 //
00003 // This library is free software; you can redistribute it and/or
00004 // modify it under the terms of the GNU Lesser General Public
00005 // License as published by the Free Software Foundation; either
00006 // version 2.1 of the License.
00007 //
00008 // This library is distributed in the hope that it will be useful,
00009 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00010 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00011 // Lesser General Public License for more details.
00012 //
00013 // You should have received a copy of the GNU Lesser General Public
00014 // License along with this library; if not, write to the Free Software
00015 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00016 //
00017 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00018 //
00019 #ifndef _GEOMAlgo_ShapeInfoFiller_HeaderFile
00020 #define _GEOMAlgo_ShapeInfoFiller_HeaderFile
00021 
00022 #include <Standard.hxx>
00023 #include <Standard_Macro.hxx>
00024 #include <TopoDS_Shape.hxx>
00025 #include <GEOMAlgo_ShapeInfo.hxx>
00026 #include <GEOMAlgo_IndexedDataMapOfShapeShapeInfo.hxx>
00027 #include <Standard_Real.hxx>
00028 #include <GEOMAlgo_Algo.hxx>
00029 #include <TopoDS_Face.hxx>
00030 #include <gp_Pln.hxx>
00031 #include <gp_Sphere.hxx>
00032 #include <gp_Cylinder.hxx>
00033 #include <gp_Cone.hxx>
00034 #include <gp_Torus.hxx>
00035 #include <TopoDS_Solid.hxx>
00036 
00037 //=======================================================================
00038 //class    : GEOMAlgo_ShapeInfoFiller
00039 //purpose  :
00040 //=======================================================================
00041 class GEOMAlgo_ShapeInfoFiller  : public GEOMAlgo_Algo
00042 {
00043  public:
00044   Standard_EXPORT
00045     GEOMAlgo_ShapeInfoFiller();
00046 
00047   Standard_EXPORT
00048     virtual ~GEOMAlgo_ShapeInfoFiller();
00049 
00050   Standard_EXPORT
00051     void SetShape(const TopoDS_Shape& aS) ;
00052 
00053   Standard_EXPORT
00054     const TopoDS_Shape& Shape() const;
00055 
00056   Standard_EXPORT
00057     void SetTolerance(const Standard_Real aT) ;
00058 
00059   Standard_EXPORT
00060     Standard_Real Tolerance() const;
00061 
00062   Standard_EXPORT
00063     const GEOMAlgo_ShapeInfo& Info() const;
00064 
00065   Standard_EXPORT
00066     const GEOMAlgo_ShapeInfo& Info(const TopoDS_Shape& aS) const;
00067 
00068   Standard_EXPORT
00069     virtual  void Perform() ;
00070 
00071  protected:
00072   Standard_EXPORT
00073     virtual  void CheckData() ;
00074 
00075   Standard_EXPORT
00076     void FillNbSubShapes(const TopoDS_Shape& aS,GEOMAlgo_ShapeInfo& aInfo) ;
00077 
00078   Standard_EXPORT
00079     void FillSubShapes(const TopoDS_Shape& aS) ;
00080 
00081   Standard_EXPORT
00082     void FillShape(const TopoDS_Shape& aS) ;
00083 
00084   Standard_EXPORT
00085     void FillVertex(const TopoDS_Shape& aS) ;
00086 
00087   Standard_EXPORT
00088     void FillEdge(const TopoDS_Shape& aS) ;
00089 
00090   Standard_EXPORT
00091     void FillFace(const TopoDS_Shape& aS) ;
00092 
00093   Standard_EXPORT
00094     void FillSolid(const TopoDS_Shape& aS) ;
00095 
00096   Standard_EXPORT
00097     void FillContainer(const TopoDS_Shape& aS) ;
00098 
00099   Standard_EXPORT
00100     void FillDetails(const TopoDS_Face& aF,const gp_Pln& aPln) ;
00101 
00102   Standard_EXPORT
00103     void FillDetails(const TopoDS_Face& aF,const gp_Sphere& aSph) ;
00104 
00105   Standard_EXPORT
00106     void FillDetails(const TopoDS_Face& aF,const gp_Cylinder& aCyl) ;
00107 
00108   Standard_EXPORT
00109     void FillDetails(const TopoDS_Face& aF,const gp_Cone& aCone) ;
00110 
00111   Standard_EXPORT
00112     void FillDetails(const TopoDS_Face& aF,const gp_Torus& aTorus) ;
00113 
00114   Standard_EXPORT
00115     void FillDetails(const TopoDS_Solid& aS) ;
00116 
00117 
00118   TopoDS_Shape myShape;
00119   GEOMAlgo_ShapeInfo myEmptyInfo;
00120   GEOMAlgo_IndexedDataMapOfShapeShapeInfo myMapInfo;
00121   Standard_Real myTolerance;
00122 };
00123 #endif