Salome HOME
Revert "Synchronize adm files"
[modules/geom.git] / src / GEOMAlgo / GEOMAlgo_FinderShapeOn1.hxx
1 // Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License, or (at your option) any later version.
10 //
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 // Lesser General Public License for more details.
15 //
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
19 //
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22
23 // File:        GEOMAlgo_FinderShapeOn1.hxx
24 // Created:     Fri Mar  4 10:31:06 2005
25 // Author:      Peter KURNEV
26
27 #ifndef _GEOMAlgo_FinderShapeOn1_HeaderFile
28 #define _GEOMAlgo_FinderShapeOn1_HeaderFile
29
30 #include <GEOMAlgo_State.hxx>
31 #include <GEOMAlgo_IndexedDataMapOfShapeState.hxx>
32 #include <GEOMAlgo_ShapeAlgo.hxx>
33 #include <GEOMAlgo_ListOfPnt.hxx>
34
35 #include <TopAbs_State.hxx>
36 #include <TopAbs_ShapeEnum.hxx>
37 #include <TopoDS_Face.hxx>
38 #include <TopoDS_Edge.hxx>
39 #include <TopTools_ListOfShape.hxx>
40
41 #include <Geom_Surface.hxx>
42 #include <Handle_Geom_Surface.hxx>
43 #include <GeomAdaptor_Surface.hxx>
44
45 #include <gp_Pnt.hxx>
46
47 #include <Standard.hxx>
48 #include <Standard_Macro.hxx>
49 #include <Standard_Integer.hxx>
50
51 //=======================================================================
52 //function : GEOMAlgo_FinderShapeOn1
53 //purpose  :
54 //=======================================================================
55 class GEOMAlgo_FinderShapeOn1  : public GEOMAlgo_ShapeAlgo
56 {
57  public:
58   Standard_EXPORT
59     GEOMAlgo_FinderShapeOn1();
60
61   Standard_EXPORT
62     virtual ~GEOMAlgo_FinderShapeOn1();
63
64   Standard_EXPORT
65     void SetSurface(const Handle(Geom_Surface)& aS) ;
66
67   Standard_EXPORT
68     void SetShapeType(const TopAbs_ShapeEnum aST) ;
69
70   Standard_EXPORT
71     void SetState(const GEOMAlgo_State aSF) ;
72
73   Standard_EXPORT
74     void SetNbPntsMin(const Standard_Integer aNb) ;
75
76   Standard_EXPORT
77     Standard_Integer NbPntsMin() const;
78
79   Standard_EXPORT
80     void SetNbPntsMax(const Standard_Integer aNb) ;
81
82   Standard_EXPORT
83     Standard_Integer NbPntsMax() const;
84
85   Standard_EXPORT
86     const Handle_Geom_Surface& Surface() const;
87
88   Standard_EXPORT
89     TopAbs_ShapeEnum ShapeType() const;
90
91   Standard_EXPORT
92     GEOMAlgo_State State() const;
93
94   Standard_EXPORT
95     virtual  void Perform() ;
96
97   Standard_EXPORT
98     const TopTools_ListOfShape& Shapes() const;
99
100   Standard_EXPORT
101     const GEOMAlgo_IndexedDataMapOfShapeState& MSS() const;
102
103  protected:
104   Standard_EXPORT
105     virtual  void CheckData() ;
106
107   Standard_EXPORT
108     void ProcessVertices() ;
109
110   Standard_EXPORT
111     void ProcessEdges() ;
112
113   Standard_EXPORT
114     void ProcessFaces() ;
115
116   Standard_EXPORT
117     void ProcessSolids() ;
118
119   Standard_EXPORT
120     void InnerPoints(const TopoDS_Face& aF,
121                      GEOMAlgo_ListOfPnt& aLP) ;
122
123   Standard_EXPORT
124     void InnerPoints(const TopoDS_Edge& aE,
125                      GEOMAlgo_ListOfPnt& aLP) ;
126
127   Standard_EXPORT
128     void InnerPoints(const TopoDS_Edge& aE,
129                      const Standard_Integer aNbPnts,
130                      GEOMAlgo_ListOfPnt& aLP) ;
131
132   Standard_EXPORT
133     virtual  TopAbs_State GetPointState(const gp_Pnt& aP) ;
134
135
136   Handle_Geom_Surface mySurface;
137   TopAbs_ShapeEnum myShapeType;
138   GEOMAlgo_State myState;
139   Standard_Integer myNbPntsMin;
140   Standard_Integer myNbPntsMax;
141   GeomAdaptor_Surface myGAS;
142   TopTools_ListOfShape myLS;
143   GEOMAlgo_IndexedDataMapOfShapeState myMSS;
144 };
145
146 #endif