1 // Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
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.
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.
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
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 #ifndef _GEOMAlgo_WESScaler_HeaderFile
21 #define _GEOMAlgo_WESScaler_HeaderFile
23 #ifndef _Standard_Real_HeaderFile
24 #include <Standard_Real.hxx>
26 #ifndef _TopoDS_Face_HeaderFile
27 #include <TopoDS_Face.hxx>
29 #ifndef _TopTools_ListOfShape_HeaderFile
30 #include <TopTools_ListOfShape.hxx>
32 #ifndef _GEOMAlgo_DataMapOfOrientedShapeShape_HeaderFile
33 #include <GEOMAlgo_DataMapOfOrientedShapeShape.hxx>
35 #ifndef _TopoDS_Shape_HeaderFile
36 #include <TopoDS_Shape.hxx>
38 #ifndef _GEOMAlgo_Algo_HeaderFile
39 #include <GEOMAlgo_Algo.hxx>
42 class TopTools_ListOfShape;
44 class GEOMAlgo_DataMapOfOrientedShapeShape;
47 #ifndef _Standard_HeaderFile
48 #include <Standard.hxx>
50 #ifndef _Standard_Macro_HeaderFile
51 #include <Standard_Macro.hxx>
55 class GEOMAlgo_WESScaler : public GEOMAlgo_Algo {
59 void* operator new(size_t,void* anAddress)
63 void* operator new(size_t size)
65 return Standard::Allocate(size);
67 void operator delete(void *anAddress)
69 if (anAddress) Standard::Free((Standard_Address&)anAddress);
74 //! Empty constructor <br>
75 Standard_EXPORT GEOMAlgo_WESScaler();
76 Standard_EXPORT virtual ~GEOMAlgo_WESScaler();
80 Standard_EXPORT void SetScale(const Standard_Real aWES) ;
84 Standard_EXPORT Standard_Real Scale() const;
87 Standard_EXPORT void SetFace(const TopoDS_Face& aF) ;
90 Standard_EXPORT const TopoDS_Face& Face() const;
93 Standard_EXPORT void SetEdges(const TopTools_ListOfShape& aLE) ;
96 Standard_EXPORT const TopTools_ListOfShape& Edges() const;
98 //! Performs the algorithm <br>
99 Standard_EXPORT virtual void Perform() ;
102 Standard_EXPORT const TopoDS_Face& FaceScaled() const;
105 Standard_EXPORT const TopTools_ListOfShape& EdgesScaled() const;
108 Standard_EXPORT const TopoDS_Shape& Image(const TopoDS_Shape& aS) const;
111 Standard_EXPORT const TopoDS_Shape& Origin(const TopoDS_Shape& aS) const;
115 Standard_EXPORT const GEOMAlgo_DataMapOfOrientedShapeShape& Images() const;
119 Standard_EXPORT const GEOMAlgo_DataMapOfOrientedShapeShape& Origins() const;
130 //! Performs the algorithm <br>
131 Standard_EXPORT virtual void CheckData() ;
136 Standard_Real myScale;
138 TopTools_ListOfShape myEdges;
139 TopoDS_Face myFaceScaled;
140 TopTools_ListOfShape myEdgesScaled;
141 GEOMAlgo_DataMapOfOrientedShapeShape myImages;
142 GEOMAlgo_DataMapOfOrientedShapeShape myOrigins;
143 TopoDS_Shape myShapeTmp;
162 // other Inline functions and methods (like "C++: function call" methods)