Salome HOME
13.01.2014. Adde debugging method SetFileNames.
[modules/hydro.git] / src / HYDROData / HYDROData_Transform.h
1 #ifndef HYDROData_Transform_HeaderFile
2 #define HYDROData_Transform_HeaderFile
3
4 #include <Standard.hxx>
5 #include <Standard_Macro.hxx>
6 #include <Standard_Boolean.hxx>
7 #include <Standard_Integer.hxx>
8
9 #include <gp_Trsf.hxx>
10
11 #include <TopoDS_Shape.hxx>
12 #include <TopTools_ListOfShape.hxx>
13
14 #include <BRepBuilderAPI_Transform.hxx>
15
16 #include <BOPCol_ListOfShape.hxx>
17 #include <BOPCol_MapOfShape.hxx>
18
19 #include <BOPAlgo_BuilderShape.hxx>
20 #include <BOPAlgo_Builder.hxx>
21
22 #include <TCollection_AsciiString.hxx>
23 //=======================================================================
24 //class    : HYDROData_Transform
25 //purpose  :
26 //=======================================================================
27 class HYDROData_Transform : public BOPAlgo_BuilderShape
28 {
29  public:
30   Standard_EXPORT
31     HYDROData_Transform();
32   //
33   Standard_EXPORT
34     virtual ~HYDROData_Transform();
35   //
36   Standard_EXPORT
37     void SetArgument(const TopoDS_Shape& theShape);
38   //
39   Standard_EXPORT
40     const TopoDS_Shape& Argument()const;
41   //
42   Standard_EXPORT
43     void SetToTransform(const Standard_Boolean theFlag);
44   //
45   Standard_EXPORT
46     Standard_Boolean ToTransform()const;
47   //
48   Standard_EXPORT
49     void SetTreshold(const Standard_Real theTreshold);
50   //
51   Standard_EXPORT
52     Standard_Real Treshold()const;
53   //
54   Standard_EXPORT
55     void Detect();
56   //
57   Standard_EXPORT
58     virtual void Clear();
59   //
60   Standard_EXPORT
61     virtual void Perform();
62   //
63   // History
64   Standard_EXPORT
65     virtual const TopTools_ListOfShape& Generated
66       (const TopoDS_Shape& theShape);
67   //
68   Standard_EXPORT
69     virtual const TopTools_ListOfShape& Modified
70       (const TopoDS_Shape& theShape);
71   //
72   Standard_EXPORT
73     virtual Standard_Boolean IsDeleted
74       (const TopoDS_Shape& theShape);
75   //
76   Standard_EXPORT
77     virtual Standard_Boolean HasDeleted();
78   //
79   Standard_EXPORT
80     virtual Standard_Boolean HasGenerated();
81   //
82   Standard_EXPORT
83     virtual Standard_Boolean HasModified();
84
85   Standard_EXPORT
86    static void SetFileName(const TCollection_AsciiString& theNameAfter);
87
88   //
89   // Inner content
90  protected:
91   Standard_EXPORT
92     virtual void CheckData();
93   //
94   Standard_EXPORT
95     void Prepare();
96   //
97   Standard_EXPORT
98     void Transform1();
99   //
100   Standard_EXPORT
101     void Transform2();
102   //
103   Standard_EXPORT
104     void BuildFuse();
105   //
106   Standard_EXPORT
107     void ComputeTrsf();
108   //
109  protected:
110   Standard_Boolean myToTransform;
111   Standard_Real myTreshold;
112   TopoDS_Shape myArgument;
113   //
114   gp_Trsf myTrsf1;
115   gp_Trsf myTrsf2;
116   BRepBuilderAPI_Transform* myTransform1;
117   BRepBuilderAPI_Transform* myTransform2;
118   BOPAlgo_Builder* myBuilder;
119 };
120
121 #endif