Salome HOME
2e010b6b026b346f2211c927b9370b635de05d12
[modules/geom.git] / src / GEOMAlgo / GEOMAlgo_FinderShapeOn.hxx
1
2 // Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
3 //
4 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
5 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 //
7 // This library is free software; you can redistribute it and/or
8 // modify it under the terms of the GNU Lesser General Public
9 // License as published by the Free Software Foundation; either
10 // version 2.1 of the License.
11 //
12 // This library is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15 // Lesser General Public License for more details.
16 //
17 // You should have received a copy of the GNU Lesser General Public
18 // License along with this library; if not, write to the Free Software
19 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
20 //
21 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 //
23
24 // File:        GEOMAlgo_FinderShapeOn.hxx
25 // Created:     Tue Jan 11 14:44:31 2005
26 // Author:      Peter KURNEV
27
28 #ifndef _GEOMAlgo_FinderShapeOn_HeaderFile
29 #define _GEOMAlgo_FinderShapeOn_HeaderFile
30
31 #include <Standard.hxx>
32 #include <Standard_Macro.hxx>
33 #include <Handle_Geom_Surface.hxx>
34 #include <TopAbs_ShapeEnum.hxx>
35 #include <GEOMAlgo_State.hxx>
36 #include <TopoDS_Shape.hxx>
37 #include <TopTools_ListOfShape.hxx>
38 #include <TopTools_DataMapOfShapeShape.hxx>
39 #include <GEOMAlgo_IndexedDataMapOfShapeState.hxx>
40 #include <Standard_Boolean.hxx>
41 #include <GEOMAlgo_ShapeAlgo.hxx>
42 #include <Geom_Surface.hxx>
43 #include <TopoDS_Shape.hxx>
44
45 //=======================================================================
46 //function : GEOMAlgo_FinderShapeOn
47 //purpose  :
48 //=======================================================================
49 class GEOMAlgo_FinderShapeOn  : public GEOMAlgo_ShapeAlgo
50 {
51  public:
52   Standard_EXPORT
53     GEOMAlgo_FinderShapeOn();
54
55   Standard_EXPORT
56     virtual ~GEOMAlgo_FinderShapeOn();
57
58   Standard_EXPORT
59     virtual  void Perform() ;
60
61   Standard_EXPORT
62     void SetSurface(const Handle(Geom_Surface)& aS) ;
63
64   Standard_EXPORT
65     void SetShapeType(const TopAbs_ShapeEnum aST) ;
66
67   Standard_EXPORT
68     void SetState(const GEOMAlgo_State aSF) ;
69
70   Standard_EXPORT
71     const Handle_Geom_Surface& Surface() const;
72
73   Standard_EXPORT
74     TopAbs_ShapeEnum ShapeType() const;
75
76   Standard_EXPORT
77     GEOMAlgo_State State() const;
78
79   Standard_EXPORT
80     const TopTools_ListOfShape& Shapes() const;
81
82   Standard_EXPORT
83     static  void CopySource(const TopoDS_Shape& aS,
84                             TopTools_DataMapOfShapeShape& aImages,
85                             TopTools_DataMapOfShapeShape& aOriginals,
86                             TopoDS_Shape& aSC) ;
87
88   Standard_EXPORT
89     static  Standard_Boolean BuildTriangulation(const TopoDS_Shape& aS) ;
90
91 protected:
92   Standard_EXPORT
93     virtual  void CheckData() ;
94
95   Standard_EXPORT
96     void MakeArgument1() ;
97
98   Standard_EXPORT
99     void MakeArgument2() ;
100
101   Standard_EXPORT
102     void Find() ;
103
104   Standard_EXPORT
105     void Find(const TopoDS_Shape& aS) ;
106
107   Standard_EXPORT
108     void FindVertices() ;
109
110
111   Handle_Geom_Surface mySurface;
112   TopAbs_ShapeEnum myShapeType;
113   GEOMAlgo_State myState;
114   TopoDS_Shape myArg1;
115   TopoDS_Shape myArg2;
116   TopTools_ListOfShape myLS;
117   TopTools_DataMapOfShapeShape myImages;
118   GEOMAlgo_IndexedDataMapOfShapeState myMSS;
119   Standard_Boolean myIsAnalytic;
120 };
121 #endif