Salome HOME
3ca0f7aaf874dd3af2854444cdce0c14d9540429
[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 <Standard_Boolean.hxx>
34
35 #include <Handle_Geom_Surface.hxx>
36 #include <Geom_Surface.hxx>
37
38 #include <TopAbs_ShapeEnum.hxx>
39
40 #include <TopoDS_Shape.hxx>
41
42 #include <TopTools_ListOfShape.hxx>
43 #include <TopTools_DataMapOfShapeShape.hxx>
44
45
46 #include <GEOMAlgo_State.hxx>
47 #include <GEOMAlgo_ShapeAlgo.hxx>
48 #include <GEOMAlgo_IndexedDataMapOfShapeState.hxx>
49
50 //=======================================================================
51 //function : GEOMAlgo_FinderShapeOn
52 //purpose  :
53 //=======================================================================
54 class GEOMAlgo_FinderShapeOn  : public GEOMAlgo_ShapeAlgo
55 {
56  public:
57   Standard_EXPORT
58     GEOMAlgo_FinderShapeOn();
59
60   Standard_EXPORT
61     virtual ~GEOMAlgo_FinderShapeOn();
62
63   Standard_EXPORT
64     virtual  void Perform() ;
65
66   Standard_EXPORT
67     void SetSurface(const Handle(Geom_Surface)& aS) ;
68
69   Standard_EXPORT
70     void SetShapeType(const TopAbs_ShapeEnum aST) ;
71
72   Standard_EXPORT
73     void SetState(const GEOMAlgo_State aSF) ;
74
75   Standard_EXPORT
76     const Handle_Geom_Surface& Surface() const;
77
78   Standard_EXPORT
79     TopAbs_ShapeEnum ShapeType() const;
80
81   Standard_EXPORT
82     GEOMAlgo_State State() const;
83
84   Standard_EXPORT
85     const TopTools_ListOfShape& Shapes() const;
86
87   Standard_EXPORT
88     static  void CopySource(const TopoDS_Shape& aS,
89                             TopTools_DataMapOfShapeShape& aImages,
90                             TopTools_DataMapOfShapeShape& aOriginals,
91                             TopoDS_Shape& aSC) ;
92
93   Standard_EXPORT
94     static  Standard_Boolean BuildTriangulation(const TopoDS_Shape& aS) ;
95
96 protected:
97   Standard_EXPORT
98     virtual  void CheckData() ;
99
100   Standard_EXPORT
101     void MakeArgument1() ;
102
103   Standard_EXPORT
104     void MakeArgument2() ;
105
106   Standard_EXPORT
107     void Find() ;
108
109   Standard_EXPORT
110     void Find(const TopoDS_Shape& aS) ;
111
112   Standard_EXPORT
113     void FindVertices() ;
114
115
116   Handle_Geom_Surface mySurface;
117   TopAbs_ShapeEnum myShapeType;
118   GEOMAlgo_State myState;
119   TopoDS_Shape myArg1;
120   TopoDS_Shape myArg2;
121   TopTools_ListOfShape myLS;
122   TopTools_DataMapOfShapeShape myImages;
123   GEOMAlgo_IndexedDataMapOfShapeState myMSS;
124   Standard_Boolean myIsAnalytic;
125 };
126 #endif