Salome HOME
PR: synchro V6_main tag mergeto_V7_main_11Feb13
[modules/geom.git] / src / BlockFix / BlockFix_BlockFixAPI.hxx
1 // Copyright (C) 2007-2012  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.
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 #ifndef _BlockFix_BlockFixAPI_HeaderFile
23 #define _BlockFix_BlockFixAPI_HeaderFile
24
25 #include <Standard.hxx>
26 #include <Standard_DefineHandle.hxx>
27
28 #include <Handle_ShapeBuild_ReShape.hxx>
29 #include <TopoDS_Shape.hxx>
30 #include <Standard_Real.hxx>
31 #include <MMgt_TShared.hxx>
32
33 DEFINE_STANDARD_HANDLE(BlockFix_BlockFixAPI, MMgt_TShared);
34
35 class BlockFix_BlockFixAPI : public MMgt_TShared
36 {
37 public:
38   Standard_EXPORT BlockFix_BlockFixAPI();
39   Standard_EXPORT ~BlockFix_BlockFixAPI();
40
41   void SetShape(const TopoDS_Shape& Shape);
42   TopoDS_Shape Shape() const;
43   Handle_ShapeBuild_ReShape& Context();
44   Standard_Real& Tolerance();
45   Standard_Integer& OptimumNbFaces();
46   Standard_EXPORT void Perform();
47
48   DEFINE_STANDARD_RTTI(BlockFix_BlockFixAPI);
49
50 private:
51   Handle_ShapeBuild_ReShape myContext;
52   TopoDS_Shape myShape;
53   Standard_Real myTolerance;
54   Standard_Integer myOptimumNbFaces;
55 };
56
57 //=======================================================================
58 //function : SetShape
59 //purpose  :
60 //=======================================================================
61 inline void BlockFix_BlockFixAPI::SetShape(const TopoDS_Shape& Shape)
62 {
63   myShape = Shape;
64 }
65
66 //=======================================================================
67 //function : Shape
68 //purpose  :
69 //=======================================================================
70 inline TopoDS_Shape BlockFix_BlockFixAPI::Shape() const
71 {
72   return myShape;
73 }
74
75 //=======================================================================
76 //function : Context
77 //purpose  :
78 //=======================================================================
79 inline Handle(ShapeBuild_ReShape)& BlockFix_BlockFixAPI::Context()
80 {
81   return myContext;
82 }
83
84 //=======================================================================
85 //function : Tolerance
86 //purpose  :
87 //=======================================================================
88 inline Standard_Real& BlockFix_BlockFixAPI::Tolerance()
89 {
90   return myTolerance;
91 }
92
93 //=======================================================================
94 //function : OptimumNbFaces
95 //purpose  :
96 //=======================================================================
97 inline Standard_Integer& BlockFix_BlockFixAPI::OptimumNbFaces()
98 {
99   return myOptimumNbFaces;
100 }
101
102 #endif