Salome HOME
refs #651: wrapping land cover map by Python
[modules/hydro.git] / src / HYDROData / HYDROData_Transform.h
1 // Copyright (C) 2014-2015  EDF-R&D
2 // This library is free software; you can redistribute it and/or
3 // modify it under the terms of the GNU Lesser General Public
4 // License as published by the Free Software Foundation; either
5 // version 2.1 of the License, or (at your option) any later version.
6 //
7 // This library is distributed in the hope that it will be useful,
8 // but WITHOUT ANY WARRANTY; without even the implied warranty of
9 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
10 // Lesser General Public License for more details.
11 //
12 // You should have received a copy of the GNU Lesser General Public
13 // License along with this library; if not, write to the Free Software
14 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
15 //
16 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
17 //
18
19 #ifndef HYDROData_Transform_HeaderFile
20 #define HYDROData_Transform_HeaderFile
21
22 #include <Standard.hxx>
23 #include <Standard_Macro.hxx>
24 #include <Standard_Boolean.hxx>
25 #include <Standard_Integer.hxx>
26
27 #include <gp_Trsf.hxx>
28
29 #include <TopoDS_Shape.hxx>
30 #include <TopTools_ListOfShape.hxx>
31
32 #include <BRepBuilderAPI_Transform.hxx>
33
34 #include <BOPCol_ListOfShape.hxx>
35 #include <BOPCol_MapOfShape.hxx>
36
37 #include <BOPAlgo_BuilderShape.hxx>
38 #include <BOPAlgo_Builder.hxx>
39
40 #include <TCollection_AsciiString.hxx>
41 //=======================================================================
42 //class    : HYDROData_Transform
43 //purpose  :
44 //=======================================================================
45 class HYDROData_Transform : public BOPAlgo_BuilderShape
46 {
47  public:
48   Standard_EXPORT
49     HYDROData_Transform();
50   //
51   Standard_EXPORT
52     virtual ~HYDROData_Transform();
53   //
54   Standard_EXPORT
55     void SetArgument(const TopoDS_Shape& theShape);
56   //
57   Standard_EXPORT
58     const TopoDS_Shape& Argument()const;
59   //
60   Standard_EXPORT
61     void SetToTransform(const Standard_Boolean theFlag);
62   //
63   Standard_EXPORT
64     Standard_Boolean ToTransform()const;
65   //
66   Standard_EXPORT
67     void SetTreshold(const Standard_Real theTreshold);
68   //
69   Standard_EXPORT
70     Standard_Real Treshold()const;
71   //
72   Standard_EXPORT
73     void Detect();
74   //
75   Standard_EXPORT
76     virtual void Clear();
77   //
78   Standard_EXPORT
79     virtual void Perform();
80   //
81   // History
82   Standard_EXPORT
83     virtual const TopTools_ListOfShape& Generated
84       (const TopoDS_Shape& theShape);
85   //
86   Standard_EXPORT
87     virtual const TopTools_ListOfShape& Modified
88       (const TopoDS_Shape& theShape);
89   //
90   Standard_EXPORT
91     virtual Standard_Boolean IsDeleted
92       (const TopoDS_Shape& theShape);
93   //
94   Standard_EXPORT
95     virtual Standard_Boolean HasDeleted();
96   //
97   Standard_EXPORT
98     virtual Standard_Boolean HasGenerated();
99   //
100   Standard_EXPORT
101     virtual Standard_Boolean HasModified();
102
103   Standard_EXPORT
104    static void SetFileName(const TCollection_AsciiString& theNameAfter);
105
106   //
107   // Inner content
108  protected:
109   Standard_EXPORT
110     virtual void CheckData();
111   //
112   Standard_EXPORT
113     void Prepare();
114   //
115   Standard_EXPORT
116     void Transform1();
117   //
118   Standard_EXPORT
119     void Transform2();
120   //
121   Standard_EXPORT
122     void BuildFuse();
123   //
124   Standard_EXPORT
125     void ComputeTrsf();
126   //
127  protected:
128   Standard_Boolean myToTransform;
129   Standard_Real myTreshold;
130   TopoDS_Shape myArgument;
131   //
132   gp_Trsf myTrsf1;
133   gp_Trsf myTrsf2;
134   BRepBuilderAPI_Transform* myTransform1;
135   BRepBuilderAPI_Transform* myTransform2;
136   BOPAlgo_Builder* myBuilder;
137 };
138
139 #endif