Salome HOME
Merge from V6_3_BR 06/06/2011
[modules/geom.git] / src / GEOMAlgo / GEOMAlgo_WESScaler.hxx
1 // Copyright (C) 2007-2011  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License.
7 //
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19
20 #ifndef _GEOMAlgo_WESScaler_HeaderFile
21 #define _GEOMAlgo_WESScaler_HeaderFile
22
23 #ifndef _Standard_Real_HeaderFile
24 #include <Standard_Real.hxx>
25 #endif
26 #ifndef _TopoDS_Face_HeaderFile
27 #include <TopoDS_Face.hxx>
28 #endif
29 #ifndef _TopTools_ListOfShape_HeaderFile
30 #include <TopTools_ListOfShape.hxx>
31 #endif
32 #ifndef _GEOMAlgo_DataMapOfOrientedShapeShape_HeaderFile
33 #include <GEOMAlgo_DataMapOfOrientedShapeShape.hxx>
34 #endif
35 #ifndef _TopoDS_Shape_HeaderFile
36 #include <TopoDS_Shape.hxx>
37 #endif
38 #ifndef _GEOMAlgo_Algo_HeaderFile
39 #include <GEOMAlgo_Algo.hxx>
40 #endif
41 class TopoDS_Face;
42 class TopTools_ListOfShape;
43 class TopoDS_Shape;
44 class GEOMAlgo_DataMapOfOrientedShapeShape;
45
46
47 #ifndef _Standard_HeaderFile
48 #include <Standard.hxx>
49 #endif
50 #ifndef _Standard_Macro_HeaderFile
51 #include <Standard_Macro.hxx>
52 #endif
53
54
55 class GEOMAlgo_WESScaler  : public GEOMAlgo_Algo {
56
57 public:
58
59     void* operator new(size_t,void* anAddress) 
60       {
61         return anAddress;
62       }
63     void* operator new(size_t size) 
64       { 
65         return Standard::Allocate(size); 
66       }
67     void  operator delete(void *anAddress) 
68       { 
69         if (anAddress) Standard::Free((Standard_Address&)anAddress); 
70       }
71  // Methods PUBLIC
72  // 
73
74 //! Empty constructor <br>
75 Standard_EXPORT GEOMAlgo_WESScaler();
76 Standard_EXPORT virtual ~GEOMAlgo_WESScaler();
77
78
79 //! Modifier <br>
80 Standard_EXPORT   void SetScale(const Standard_Real aWES) ;
81
82
83 //! Selector <br>
84 Standard_EXPORT   Standard_Real Scale() const;
85
86
87 Standard_EXPORT   void SetFace(const TopoDS_Face& aF) ;
88
89
90 Standard_EXPORT  const TopoDS_Face& Face() const;
91
92
93 Standard_EXPORT   void SetEdges(const TopTools_ListOfShape& aLE) ;
94
95
96 Standard_EXPORT  const TopTools_ListOfShape& Edges() const;
97
98 //!  Performs the algorithm <br>
99 Standard_EXPORT virtual  void Perform() ;
100
101
102 Standard_EXPORT  const TopoDS_Face& FaceScaled() const;
103
104
105 Standard_EXPORT  const TopTools_ListOfShape& EdgesScaled() const;
106
107
108 Standard_EXPORT  const TopoDS_Shape& Image(const TopoDS_Shape& aS) const;
109
110
111 Standard_EXPORT  const TopoDS_Shape& Origin(const TopoDS_Shape& aS) const;
112
113
114 //! Selector <br>
115 Standard_EXPORT  const GEOMAlgo_DataMapOfOrientedShapeShape& Images() const;
116
117
118 //! Selector <br>
119 Standard_EXPORT  const GEOMAlgo_DataMapOfOrientedShapeShape& Origins() const;
120
121
122
123
124
125 protected:
126
127  // Methods PROTECTED
128  // 
129
130 //!  Performs the algorithm <br>
131 Standard_EXPORT virtual  void CheckData() ;
132
133
134  // Fields PROTECTED
135  //
136 Standard_Real myScale;
137 TopoDS_Face myFace;
138 TopTools_ListOfShape myEdges;
139 TopoDS_Face myFaceScaled;
140 TopTools_ListOfShape myEdgesScaled;
141 GEOMAlgo_DataMapOfOrientedShapeShape myImages;
142 GEOMAlgo_DataMapOfOrientedShapeShape myOrigins;
143 TopoDS_Shape myShapeTmp;
144
145
146 private: 
147
148  // Methods PRIVATE
149  // 
150
151
152  // Fields PRIVATE
153  //
154
155
156 };
157
158
159
160
161
162 // other Inline functions and methods (like "C++: function call" methods)
163 //
164
165
166 #endif