Salome HOME
Selection for image presentation & updates for interpolated stream profiles and stream.
[modules/hydro.git] / src / HYDROData / HYDROData_Transform.h
1 // Copyright (C) 2007-2015  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 #ifndef HYDROData_Transform_HeaderFile
24 #define HYDROData_Transform_HeaderFile
25
26 #include <Standard.hxx>
27 #include <Standard_Macro.hxx>
28 #include <Standard_Boolean.hxx>
29 #include <Standard_Integer.hxx>
30
31 #include <gp_Trsf.hxx>
32
33 #include <TopoDS_Shape.hxx>
34 #include <TopTools_ListOfShape.hxx>
35
36 #include <BRepBuilderAPI_Transform.hxx>
37
38 #include <BOPCol_ListOfShape.hxx>
39 #include <BOPCol_MapOfShape.hxx>
40
41 #include <BOPAlgo_BuilderShape.hxx>
42 #include <BOPAlgo_Builder.hxx>
43
44 #include <TCollection_AsciiString.hxx>
45 //=======================================================================
46 //class    : HYDROData_Transform
47 //purpose  :
48 //=======================================================================
49 class HYDROData_Transform : public BOPAlgo_BuilderShape
50 {
51  public:
52   Standard_EXPORT
53     HYDROData_Transform();
54   //
55   Standard_EXPORT
56     virtual ~HYDROData_Transform();
57   //
58   Standard_EXPORT
59     void SetArgument(const TopoDS_Shape& theShape);
60   //
61   Standard_EXPORT
62     const TopoDS_Shape& Argument()const;
63   //
64   Standard_EXPORT
65     void SetToTransform(const Standard_Boolean theFlag);
66   //
67   Standard_EXPORT
68     Standard_Boolean ToTransform()const;
69   //
70   Standard_EXPORT
71     void SetTreshold(const Standard_Real theTreshold);
72   //
73   Standard_EXPORT
74     Standard_Real Treshold()const;
75   //
76   Standard_EXPORT
77     void Detect();
78   //
79   Standard_EXPORT
80     virtual void Clear();
81   //
82   Standard_EXPORT
83     virtual void Perform();
84   //
85   // History
86   Standard_EXPORT
87     virtual const TopTools_ListOfShape& Generated
88       (const TopoDS_Shape& theShape);
89   //
90   Standard_EXPORT
91     virtual const TopTools_ListOfShape& Modified
92       (const TopoDS_Shape& theShape);
93   //
94   Standard_EXPORT
95     virtual Standard_Boolean IsDeleted
96       (const TopoDS_Shape& theShape);
97   //
98   Standard_EXPORT
99     virtual Standard_Boolean HasDeleted();
100   //
101   Standard_EXPORT
102     virtual Standard_Boolean HasGenerated();
103   //
104   Standard_EXPORT
105     virtual Standard_Boolean HasModified();
106
107   Standard_EXPORT
108    static void SetFileName(const TCollection_AsciiString& theNameAfter);
109
110   //
111   // Inner content
112  protected:
113   Standard_EXPORT
114     virtual void CheckData();
115   //
116   Standard_EXPORT
117     void Prepare();
118   //
119   Standard_EXPORT
120     void Transform1();
121   //
122   Standard_EXPORT
123     void Transform2();
124   //
125   Standard_EXPORT
126     void BuildFuse();
127   //
128   Standard_EXPORT
129     void ComputeTrsf();
130   //
131  protected:
132   Standard_Boolean myToTransform;
133   Standard_Real myTreshold;
134   TopoDS_Shape myArgument;
135   //
136   gp_Trsf myTrsf1;
137   gp_Trsf myTrsf2;
138   BRepBuilderAPI_Transform* myTransform1;
139   BRepBuilderAPI_Transform* myTransform2;
140   BOPAlgo_Builder* myBuilder;
141 };
142
143 #endif