Version: 6.3.1

src/GEOMAlgo/GEOMAlgo_FinderShapeOn1.hxx

Go to the documentation of this file.
00001 // Copyright (C) 2007-2011  CEA/DEN, EDF R&D, OPEN CASCADE
00002 //
00003 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
00004 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
00005 //
00006 // This library is free software; you can redistribute it and/or
00007 // modify it under the terms of the GNU Lesser General Public
00008 // License as published by the Free Software Foundation; either
00009 // version 2.1 of the License.
00010 //
00011 // This library is distributed in the hope that it will be useful,
00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014 // Lesser General Public License for more details.
00015 //
00016 // You should have received a copy of the GNU Lesser General Public
00017 // License along with this library; if not, write to the Free Software
00018 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00019 //
00020 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00021 //
00022 
00023 #ifndef _GEOMAlgo_FinderShapeOn1_HeaderFile
00024 #define _GEOMAlgo_FinderShapeOn1_HeaderFile
00025 
00026 #ifndef _Handle_Geom_Surface_HeaderFile
00027 #include <Handle_Geom_Surface.hxx>
00028 #endif
00029 #ifndef _TopAbs_ShapeEnum_HeaderFile
00030 #include <TopAbs_ShapeEnum.hxx>
00031 #endif
00032 #ifndef _GEOMAlgo_State_HeaderFile
00033 #include <GEOMAlgo_State.hxx>
00034 #endif
00035 #ifndef _Standard_Integer_HeaderFile
00036 #include <Standard_Integer.hxx>
00037 #endif
00038 #ifndef _GeomAdaptor_Surface_HeaderFile
00039 #include <GeomAdaptor_Surface.hxx>
00040 #endif
00041 #ifndef _TopTools_ListOfShape_HeaderFile
00042 #include <TopTools_ListOfShape.hxx>
00043 #endif
00044 #ifndef _GEOMAlgo_IndexedDataMapOfShapeState_HeaderFile
00045 #include <GEOMAlgo_IndexedDataMapOfShapeState.hxx>
00046 #endif
00047 #ifndef _GEOMAlgo_ShapeAlgo_HeaderFile
00048 #include <GEOMAlgo_ShapeAlgo.hxx>
00049 #endif
00050 #ifndef _TopAbs_State_HeaderFile
00051 #include <TopAbs_State.hxx>
00052 #endif
00053 class Geom_Surface;
00054 class TopTools_ListOfShape;
00055 class TopoDS_Face;
00056 class GEOMAlgo_ListOfPnt;
00057 class TopoDS_Edge;
00058 class GEOMAlgo_IndexedDataMapOfShapeState;
00059 class gp_Pnt;
00060 
00061 
00062 #ifndef _Standard_HeaderFile
00063 #include <Standard.hxx>
00064 #endif
00065 #ifndef _Standard_Macro_HeaderFile
00066 #include <Standard_Macro.hxx>
00067 #endif
00068 
00069 
00070 class GEOMAlgo_FinderShapeOn1  : public GEOMAlgo_ShapeAlgo {
00071 
00072 public:
00073 
00074     void* operator new(size_t,void* anAddress) 
00075       {
00076         return anAddress;
00077       }
00078     void* operator new(size_t size) 
00079       { 
00080         return Standard::Allocate(size); 
00081       }
00082     void  operator delete(void *anAddress) 
00083       { 
00084         if (anAddress) Standard::Free((Standard_Address&)anAddress); 
00085       }
00086  // Methods PUBLIC
00087  // 
00088 
00089 
00090 Standard_EXPORT GEOMAlgo_FinderShapeOn1();
00091 Standard_EXPORT virtual ~GEOMAlgo_FinderShapeOn1();
00092 
00093 
00094 Standard_EXPORT   void SetSurface(const Handle(Geom_Surface)& aS) ;
00095 
00096 
00097 Standard_EXPORT   void SetShapeType(const TopAbs_ShapeEnum aST) ;
00098 
00099 
00100 Standard_EXPORT   void SetState(const GEOMAlgo_State aSF) ;
00101 
00102 
00103 Standard_EXPORT   void SetNbPntsMin(const Standard_Integer aNb) ;
00104 
00105 
00106 Standard_EXPORT   Standard_Integer NbPntsMin() const;
00107 
00108 
00109 Standard_EXPORT   void SetNbPntsMax(const Standard_Integer aNb) ;
00110 
00111 
00112 Standard_EXPORT   Standard_Integer NbPntsMax() const;
00113 
00114 
00115 Standard_EXPORT  const Handle_Geom_Surface& Surface() const;
00116 
00117 
00118 Standard_EXPORT   TopAbs_ShapeEnum ShapeType() const;
00119 
00120 
00121 Standard_EXPORT   GEOMAlgo_State State() const;
00122 
00123 
00124 Standard_EXPORT virtual  void Perform() ;
00125 
00126 
00127 Standard_EXPORT  const TopTools_ListOfShape& Shapes() const;
00128 
00129 
00130 Standard_EXPORT  const GEOMAlgo_IndexedDataMapOfShapeState& MSS() const;
00131 
00132 
00133 
00134 
00135 
00136 protected:
00137 
00138  // Methods PROTECTED
00139  // 
00140 
00141 
00142 Standard_EXPORT virtual  void CheckData() ;
00143 
00144 
00145 Standard_EXPORT   void ProcessVertices() ;
00146 
00147 
00148 Standard_EXPORT   void ProcessEdges() ;
00149 
00150 
00151 Standard_EXPORT   void ProcessFaces() ;
00152 
00153 
00154 Standard_EXPORT   void ProcessSolids() ;
00155 
00156 
00157 Standard_EXPORT   void InnerPoints(const TopoDS_Face& aF,GEOMAlgo_ListOfPnt& aLP) ;
00158 
00159 
00160 Standard_EXPORT   void InnerPoints(const TopoDS_Edge& aE,GEOMAlgo_ListOfPnt& aLP) ;
00161 
00162 
00163 Standard_EXPORT   void InnerPoints(const TopoDS_Edge& aE,const Standard_Integer aNbPnts,GEOMAlgo_ListOfPnt& aLP) ;
00164 
00165 
00166 Standard_EXPORT virtual  TopAbs_State GetPointState(const gp_Pnt& aP) ;
00167 
00168 
00169  // Fields PROTECTED
00170  //
00171 Handle_Geom_Surface mySurface;
00172 TopAbs_ShapeEnum myShapeType;
00173 GEOMAlgo_State myState;
00174 Standard_Integer myNbPntsMin;
00175 Standard_Integer myNbPntsMax;
00176 GeomAdaptor_Surface myGAS;
00177 TopTools_ListOfShape myLS;
00178 GEOMAlgo_IndexedDataMapOfShapeState myMSS;
00179 
00180 
00181 private: 
00182 
00183  // Methods PRIVATE
00184  // 
00185 
00186 
00187  // Fields PRIVATE
00188  //
00189 
00190 
00191 };
00192 
00193 
00194 
00195 
00196 
00197 // other Inline functions and methods (like "C++: function call" methods)
00198 //
00199 
00200 
00201 #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