Back to index

salome-geom  6.5.0
GEOMAlgo_FinderShapeOn1.hxx
Go to the documentation of this file.
00001 // Copyright (C) 2007-2012  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 // File:        GEOMAlgo_FinderShapeOn1.hxx
00024 // Created:     Fri Mar  4 10:31:06 2005
00025 // Author:      Peter KURNEV
00026 
00027 #ifndef _GEOMAlgo_FinderShapeOn1_HeaderFile
00028 #define _GEOMAlgo_FinderShapeOn1_HeaderFile
00029 
00030 #include <GEOMAlgo_State.hxx>
00031 #include <GEOMAlgo_IndexedDataMapOfShapeState.hxx>
00032 #include <GEOMAlgo_ShapeAlgo.hxx>
00033 #include <GEOMAlgo_ListOfPnt.hxx>
00034 
00035 #include <TopAbs_State.hxx>
00036 #include <TopAbs_ShapeEnum.hxx>
00037 #include <TopoDS_Face.hxx>
00038 #include <TopoDS_Edge.hxx>
00039 #include <TopTools_ListOfShape.hxx>
00040 
00041 #include <Geom_Surface.hxx>
00042 #include <Handle_Geom_Surface.hxx>
00043 #include <GeomAdaptor_Surface.hxx>
00044 
00045 #include <gp_Pnt.hxx>
00046 
00047 #include <Standard.hxx>
00048 #include <Standard_Macro.hxx>
00049 #include <Standard_Integer.hxx>
00050 
00051 //=======================================================================
00052 //function : GEOMAlgo_FinderShapeOn1
00053 //purpose  :
00054 //=======================================================================
00055 class GEOMAlgo_FinderShapeOn1  : public GEOMAlgo_ShapeAlgo
00056 {
00057  public:
00058   Standard_EXPORT
00059     GEOMAlgo_FinderShapeOn1();
00060 
00061   Standard_EXPORT
00062     virtual ~GEOMAlgo_FinderShapeOn1();
00063 
00064   Standard_EXPORT
00065     void SetSurface(const Handle(Geom_Surface)& aS) ;
00066 
00067   Standard_EXPORT
00068     void SetShapeType(const TopAbs_ShapeEnum aST) ;
00069 
00070   Standard_EXPORT
00071     void SetState(const GEOMAlgo_State aSF) ;
00072 
00073   Standard_EXPORT
00074     void SetNbPntsMin(const Standard_Integer aNb) ;
00075 
00076   Standard_EXPORT
00077     Standard_Integer NbPntsMin() const;
00078 
00079   Standard_EXPORT
00080     void SetNbPntsMax(const Standard_Integer aNb) ;
00081 
00082   Standard_EXPORT
00083     Standard_Integer NbPntsMax() const;
00084 
00085   Standard_EXPORT
00086     const Handle_Geom_Surface& Surface() const;
00087 
00088   Standard_EXPORT
00089     TopAbs_ShapeEnum ShapeType() const;
00090 
00091   Standard_EXPORT
00092     GEOMAlgo_State State() const;
00093 
00094   Standard_EXPORT
00095     virtual  void Perform() ;
00096 
00097   Standard_EXPORT
00098     const TopTools_ListOfShape& Shapes() const;
00099 
00100   Standard_EXPORT
00101     const GEOMAlgo_IndexedDataMapOfShapeState& MSS() const;
00102 
00103  protected:
00104   Standard_EXPORT
00105     virtual  void CheckData() ;
00106 
00107   Standard_EXPORT
00108     void ProcessVertices() ;
00109 
00110   Standard_EXPORT
00111     void ProcessEdges() ;
00112 
00113   Standard_EXPORT
00114     void ProcessFaces() ;
00115 
00116   Standard_EXPORT
00117     void ProcessSolids() ;
00118 
00119   Standard_EXPORT
00120     void InnerPoints(const TopoDS_Face& aF,
00121                      GEOMAlgo_ListOfPnt& aLP) ;
00122 
00123   Standard_EXPORT
00124     void InnerPoints(const TopoDS_Edge& aE,
00125                      GEOMAlgo_ListOfPnt& aLP) ;
00126 
00127   Standard_EXPORT
00128     void InnerPoints(const TopoDS_Edge& aE,
00129                      const Standard_Integer aNbPnts,
00130                      GEOMAlgo_ListOfPnt& aLP) ;
00131 
00132   Standard_EXPORT
00133     virtual  TopAbs_State GetPointState(const gp_Pnt& aP) ;
00134 
00135 
00136   Handle_Geom_Surface mySurface;
00137   TopAbs_ShapeEnum myShapeType;
00138   GEOMAlgo_State myState;
00139   Standard_Integer myNbPntsMin;
00140   Standard_Integer myNbPntsMax;
00141   GeomAdaptor_Surface myGAS;
00142   TopTools_ListOfShape myLS;
00143   GEOMAlgo_IndexedDataMapOfShapeState myMSS;
00144 };
00145 
00146 #endif