Version: 6.3.1

src/GEOMAlgo/GEOMAlgo_ShapeInfoFiller.hxx

Go to the documentation of this file.
00001 // Copyright (C) 2007-2011  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 
00020 #ifndef _GEOMAlgo_ShapeInfoFiller_HeaderFile
00021 #define _GEOMAlgo_ShapeInfoFiller_HeaderFile
00022 
00023 #ifndef _TopoDS_Shape_HeaderFile
00024 #include <TopoDS_Shape.hxx>
00025 #endif
00026 #ifndef _GEOMAlgo_ShapeInfo_HeaderFile
00027 #include <GEOMAlgo_ShapeInfo.hxx>
00028 #endif
00029 #ifndef _GEOMAlgo_IndexedDataMapOfShapeShapeInfo_HeaderFile
00030 #include <GEOMAlgo_IndexedDataMapOfShapeShapeInfo.hxx>
00031 #endif
00032 #ifndef _Standard_Real_HeaderFile
00033 #include <Standard_Real.hxx>
00034 #endif
00035 #ifndef _GEOMAlgo_Algo_HeaderFile
00036 #include <GEOMAlgo_Algo.hxx>
00037 #endif
00038 class TopoDS_Shape;
00039 class GEOMAlgo_ShapeInfo;
00040 class TopoDS_Face;
00041 class gp_Pln;
00042 class gp_Sphere;
00043 class gp_Cylinder;
00044 class gp_Cone;
00045 class gp_Torus;
00046 class TopoDS_Solid;
00047 
00048 
00049 #ifndef _Standard_HeaderFile
00050 #include <Standard.hxx>
00051 #endif
00052 #ifndef _Standard_Macro_HeaderFile
00053 #include <Standard_Macro.hxx>
00054 #endif
00055 
00056 
00057 class GEOMAlgo_ShapeInfoFiller  : public GEOMAlgo_Algo {
00058 
00059 public:
00060 
00061     void* operator new(size_t,void* anAddress) 
00062       {
00063         return anAddress;
00064       }
00065     void* operator new(size_t size) 
00066       { 
00067         return Standard::Allocate(size); 
00068       }
00069     void  operator delete(void *anAddress) 
00070       { 
00071         if (anAddress) Standard::Free((Standard_Address&)anAddress); 
00072       }
00073  // Methods PUBLIC
00074  // 
00075 
00076 
00077 Standard_EXPORT GEOMAlgo_ShapeInfoFiller();
00078 Standard_EXPORT virtual ~GEOMAlgo_ShapeInfoFiller();
00079 
00080 
00081 Standard_EXPORT   void SetShape(const TopoDS_Shape& aS) ;
00082 
00083 
00084 Standard_EXPORT  const TopoDS_Shape& Shape() const;
00085 
00086 
00087 Standard_EXPORT   void SetTolerance(const Standard_Real aT) ;
00088 
00089 
00090 Standard_EXPORT   Standard_Real Tolerance() const;
00091 
00092 
00093 Standard_EXPORT  const GEOMAlgo_ShapeInfo& Info() const;
00094 
00095 
00096 Standard_EXPORT  const GEOMAlgo_ShapeInfo& Info(const TopoDS_Shape& aS) const;
00097 
00098 
00099 Standard_EXPORT virtual  void Perform() ;
00100 
00101 
00102 
00103 
00104 
00105 protected:
00106 
00107  // Methods PROTECTED
00108  // 
00109 
00110 
00111 Standard_EXPORT virtual  void CheckData() ;
00112 
00113 
00114 Standard_EXPORT   void FillNbSubShapes(const TopoDS_Shape& aS,GEOMAlgo_ShapeInfo& aInfo) ;
00115 
00116 
00117 Standard_EXPORT   void FillSubShapes(const TopoDS_Shape& aS) ;
00118 
00119 
00120 Standard_EXPORT   void FillShape(const TopoDS_Shape& aS) ;
00121 
00122 
00123 Standard_EXPORT   void FillVertex(const TopoDS_Shape& aS) ;
00124 
00125 
00126 Standard_EXPORT   void FillEdge(const TopoDS_Shape& aS) ;
00127 
00128 
00129 Standard_EXPORT   void FillFace(const TopoDS_Shape& aS) ;
00130 
00131 
00132 Standard_EXPORT   void FillSolid(const TopoDS_Shape& aS) ;
00133 
00134 
00135 Standard_EXPORT   void FillContainer(const TopoDS_Shape& aS) ;
00136 
00137 
00138 Standard_EXPORT   void FillDetails(const TopoDS_Face& aF,const gp_Pln& aPln) ;
00139 
00140 
00141 Standard_EXPORT   void FillDetails(const TopoDS_Face& aF,const gp_Sphere& aSph) ;
00142 
00143 
00144 Standard_EXPORT   void FillDetails(const TopoDS_Face& aF,const gp_Cylinder& aCyl) ;
00145 
00146 
00147 Standard_EXPORT   void FillDetails(const TopoDS_Face& aF,const gp_Cone& aCone) ;
00148 
00149 
00150 Standard_EXPORT   void FillDetails(const TopoDS_Face& aF,const gp_Torus& aTorus) ;
00151 
00152 
00153 Standard_EXPORT   void FillDetails(const TopoDS_Solid& aS) ;
00154 
00155 
00156  // Fields PROTECTED
00157  //
00158 TopoDS_Shape myShape;
00159 GEOMAlgo_ShapeInfo myEmptyInfo;
00160 GEOMAlgo_IndexedDataMapOfShapeShapeInfo myMapInfo;
00161 Standard_Real myTolerance;
00162 
00163 
00164 private: 
00165 
00166  // Methods PRIVATE
00167  // 
00168 
00169 
00170  // Fields PRIVATE
00171  //
00172 
00173 
00174 };
00175 
00176 
00177 
00178 
00179 
00180 // other Inline functions and methods (like "C++: function call" methods)
00181 //
00182 
00183 
00184 #endif
Copyright © 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS