1 // Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
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.
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.
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
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 #ifndef _BlockFix_BlockFixAPI_HeaderFile
23 #define _BlockFix_BlockFixAPI_HeaderFile
25 #include <Standard.hxx>
26 #include <Standard_DefineHandle.hxx>
28 #include <Handle_ShapeBuild_ReShape.hxx>
29 #include <TopoDS_Shape.hxx>
30 #include <Standard_Real.hxx>
31 #include <MMgt_TShared.hxx>
33 DEFINE_STANDARD_HANDLE(BlockFix_BlockFixAPI, MMgt_TShared);
35 class BlockFix_BlockFixAPI : public MMgt_TShared
38 Standard_EXPORT BlockFix_BlockFixAPI();
39 Standard_EXPORT ~BlockFix_BlockFixAPI();
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();
48 DEFINE_STANDARD_RTTI(BlockFix_BlockFixAPI);
51 Handle_ShapeBuild_ReShape myContext;
53 Standard_Real myTolerance;
54 Standard_Integer myOptimumNbFaces;
57 //=======================================================================
60 //=======================================================================
61 inline void BlockFix_BlockFixAPI::SetShape(const TopoDS_Shape& Shape)
66 //=======================================================================
69 //=======================================================================
70 inline TopoDS_Shape BlockFix_BlockFixAPI::Shape() const
75 //=======================================================================
78 //=======================================================================
79 inline Handle(ShapeBuild_ReShape)& BlockFix_BlockFixAPI::Context()
84 //=======================================================================
85 //function : Tolerance
87 //=======================================================================
88 inline Standard_Real& BlockFix_BlockFixAPI::Tolerance()
93 //=======================================================================
94 //function : OptimumNbFaces
96 //=======================================================================
97 inline Standard_Integer& BlockFix_BlockFixAPI::OptimumNbFaces()
99 return myOptimumNbFaces;