1 // Copyright (C) 2007-2021 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, or (at your option) any later version.
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
23 #ifndef _BlockFix_BlockFixAPI_HeaderFile
24 #define _BlockFix_BlockFixAPI_HeaderFile
26 #include <Standard.hxx>
27 #include <Standard_DefineHandle.hxx>
28 #include <Standard_Transient.hxx>
30 #include <ShapeBuild_ReShape.hxx>
31 #include <TopoDS_Shape.hxx>
32 #include <Standard_Real.hxx>
34 DEFINE_STANDARD_HANDLE(BlockFix_BlockFixAPI, Standard_Transient)
36 class BlockFix_BlockFixAPI : public Standard_Transient
39 Standard_EXPORT BlockFix_BlockFixAPI();
40 Standard_EXPORT ~BlockFix_BlockFixAPI();
42 void SetShape(const TopoDS_Shape& Shape);
43 TopoDS_Shape Shape() const;
44 Handle(ShapeBuild_ReShape)& Context();
45 Standard_Real& Tolerance();
46 Standard_Integer& OptimumNbFaces();
47 Standard_EXPORT void Perform();
49 DEFINE_STANDARD_RTTIEXT(BlockFix_BlockFixAPI, Standard_Transient)
52 Handle(ShapeBuild_ReShape) myContext;
54 Standard_Real myTolerance;
55 Standard_Integer myOptimumNbFaces;
58 //=======================================================================
61 //=======================================================================
62 inline void BlockFix_BlockFixAPI::SetShape(const TopoDS_Shape& Shape)
67 //=======================================================================
70 //=======================================================================
71 inline TopoDS_Shape BlockFix_BlockFixAPI::Shape() const
76 //=======================================================================
79 //=======================================================================
80 inline Handle(ShapeBuild_ReShape)& BlockFix_BlockFixAPI::Context()
85 //=======================================================================
86 //function : Tolerance
88 //=======================================================================
89 inline Standard_Real& BlockFix_BlockFixAPI::Tolerance()
94 //=======================================================================
95 //function : OptimumNbFaces
97 //=======================================================================
98 inline Standard_Integer& BlockFix_BlockFixAPI::OptimumNbFaces()
100 return myOptimumNbFaces;