Salome HOME
149b67e310f5a019a6c3ea10d9272474225cbfc3
[modules/geom.git] / src / GEOMAlgo / GEOMAlgo_ShapeAlgo.hxx
1 // Copyright (C) 2007-2023  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 _GEOMAlgo_ShapeAlgo_HeaderFile
24 #define _GEOMAlgo_ShapeAlgo_HeaderFile
25
26 #include <Standard.hxx>
27 #include <Standard_Macro.hxx>
28 #include <TopoDS_Shape.hxx>
29 #include <Standard_Real.hxx>
30 #include <IntTools_Context.hxx>
31 #include <GEOMAlgo_Algo.hxx>
32
33 //=======================================================================
34 //class    : GEOMAlgo_ShapeAlgo
35 //purpose  :
36 //=======================================================================
37 class GEOMAlgo_ShapeAlgo  : public GEOMAlgo_Algo
38 {
39 public:
40
41   //! Sets cashed geometrical tools <br>
42   Standard_EXPORT
43     void SetContext(const Handle(IntTools_Context)& theContext) ;
44
45   //! Returns cashed geometrical tools <br>
46   Standard_EXPORT
47     const Handle(IntTools_Context)& Context() const;
48
49   Standard_EXPORT
50     void SetShape(const TopoDS_Shape& aS) ;
51
52   Standard_EXPORT
53     void SetTolerance(const Standard_Real aT) ;
54
55   Standard_EXPORT
56     const TopoDS_Shape& Shape() const;
57
58   Standard_EXPORT
59     Standard_Real Tolerance() const;
60
61   Standard_EXPORT
62     const TopoDS_Shape& Result() const;
63
64   Standard_EXPORT
65     virtual  void Perform() ;
66
67 protected:
68   Standard_EXPORT
69     GEOMAlgo_ShapeAlgo();
70
71   Standard_EXPORT
72     virtual ~GEOMAlgo_ShapeAlgo();
73
74   TopoDS_Shape myShape;
75   Standard_Real myTolerance;
76   TopoDS_Shape myResult;
77   Handle(IntTools_Context) myContext;
78 };
79
80 #endif