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