Salome HOME
untabify
[modules/geom.git] / src / GEOMAlgo / GEOMAlgo_FinderShapeOn2.hxx
1 // Copyright (C) 2007-2013  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.
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 // File:        GEOMAlgo_FinderShapeOn2.hxx
23 // Created:     Fri Mar  4 10:31:06 2005
24 // Author:      Peter KURNEV
25 //              <pkv@irinox>
26 //
27 #ifndef _GEOMAlgo_FinderShapeOn2_HeaderFile
28 #define _GEOMAlgo_FinderShapeOn2_HeaderFile
29
30 #include <Standard.hxx>
31 #include <Standard_Macro.hxx>
32 #include <TopAbs_ShapeEnum.hxx>
33 #include <GEOMAlgo_State.hxx>
34 #include <Standard_Integer.hxx>
35 //#include <Handle_GEOMAlgo_Clsf.hxx>
36 #include <GEOMAlgo_Clsf.hxx>
37 #include <TopTools_ListOfShape.hxx>
38 #include <GEOMAlgo_IndexedDataMapOfShapeState.hxx>
39 #include <GEOMAlgo_ShapeAlgo.hxx>
40 #include <GEOMAlgo_Clsf.hxx>
41 #include <TopoDS_Face.hxx>
42 #include <TopoDS_Edge.hxx>
43 #include <GEOMAlgo_ListOfPnt.hxx>
44
45 //=======================================================================
46 //function : GEOMAlgo_FinderShapeOn2
47 //purpose  :
48 //=======================================================================
49 class GEOMAlgo_FinderShapeOn2  : public GEOMAlgo_ShapeAlgo
50 {
51  public:
52   Standard_EXPORT
53     GEOMAlgo_FinderShapeOn2();
54
55   Standard_EXPORT
56     virtual ~GEOMAlgo_FinderShapeOn2();
57
58   Standard_EXPORT
59     void SetClsf(const Handle(GEOMAlgo_Clsf)& aClsf) ;
60
61   Standard_EXPORT
62     const Handle_GEOMAlgo_Clsf& Clsf() const;
63
64   Standard_EXPORT
65     void SetShapeType(const TopAbs_ShapeEnum aST) ;
66
67   Standard_EXPORT
68     TopAbs_ShapeEnum ShapeType() const;
69
70   Standard_EXPORT
71     void SetState(const GEOMAlgo_State aSF) ;
72
73   Standard_EXPORT
74     GEOMAlgo_State State() const;
75
76   Standard_EXPORT
77     void SetNbPntsMin(const Standard_Integer aNb) ;
78
79   Standard_EXPORT
80     Standard_Integer NbPntsMin() const;
81
82   Standard_EXPORT
83     void SetNbPntsMax(const Standard_Integer aNb) ;
84
85   Standard_EXPORT
86     Standard_Integer NbPntsMax() const;
87
88   Standard_EXPORT
89     virtual  void Perform() ;
90
91   Standard_EXPORT
92     const TopTools_ListOfShape& Shapes() const;
93
94   Standard_EXPORT
95     const GEOMAlgo_IndexedDataMapOfShapeState& MSS() const;
96
97 protected:
98   Standard_EXPORT
99     virtual  void CheckData() ;
100
101   Standard_EXPORT
102     void ProcessVertices() ;
103
104   Standard_EXPORT
105     void ProcessEdges() ;
106
107   Standard_EXPORT
108     void ProcessFaces() ;
109
110   Standard_EXPORT
111     void ProcessSolids() ;
112
113   Standard_EXPORT
114     void InnerPoints(const TopoDS_Face& aF,
115                      GEOMAlgo_ListOfPnt& aLP) ;
116
117   Standard_EXPORT
118     void InnerPoints(const TopoDS_Edge& aE,
119                      GEOMAlgo_ListOfPnt& aLP) ;
120
121   Standard_EXPORT
122     void InnerPoints(const TopoDS_Edge& aE,
123                      const Standard_Integer aNbPnts,
124                      GEOMAlgo_ListOfPnt& aLP) ;
125
126
127   TopAbs_ShapeEnum myShapeType;
128   GEOMAlgo_State myState;
129   Standard_Integer myNbPntsMin;
130   Standard_Integer myNbPntsMax;
131   Handle_GEOMAlgo_Clsf myClsf;
132   TopTools_ListOfShape myLS;
133   GEOMAlgo_IndexedDataMapOfShapeState myMSS;
134 };
135
136 #endif