1 // Created on: 1999-08-31
2 // Created by: Pavel DURANDIN
3 // Copyright (c) 1999-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
6 // This file is part of Open CASCADE Technology software library.
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 //=======================================================================
18 //function : SetContext
20 //=======================================================================
22 inline void ShapeUpgrade_Tool::SetContext (const Handle(ShapeBuild_ReShape)& context)
28 //=======================================================================
31 //=======================================================================
33 inline Handle(ShapeBuild_ReShape) ShapeUpgrade_Tool::Context() const
39 //=======================================================================
40 //function : SetPrecision
42 //=======================================================================
44 inline void ShapeUpgrade_Tool::SetPrecision (const Standard_Real preci)
47 if(myMaxTol < myPrecision) myMaxTol = myPrecision;
48 if(myMinTol > myPrecision) myMinTol = myPrecision;
52 //=======================================================================
53 //function : Precision
55 //=======================================================================
57 inline Standard_Real ShapeUpgrade_Tool::Precision() const
63 //=======================================================================
64 //function : SetMinTolerance
66 //=======================================================================
68 inline void ShapeUpgrade_Tool::SetMinTolerance (const Standard_Real mintol)
74 //=======================================================================
75 //function : MinTolerance
77 //=======================================================================
79 inline Standard_Real ShapeUpgrade_Tool::MinTolerance() const
85 //=======================================================================
86 //function : SetMaxTolerance
88 //=======================================================================
90 inline void ShapeUpgrade_Tool::SetMaxTolerance (const Standard_Real maxtol)
96 //=======================================================================
97 //function : MaxTolerance
99 //=======================================================================
101 inline Standard_Real ShapeUpgrade_Tool::MaxTolerance() const
106 //=======================================================================
107 //function : LimitTolerance
109 //=======================================================================
111 inline Standard_Real ShapeUpgrade_Tool::LimitTolerance(const Standard_Real toler) const
113 //only maximal restriction implemented.
114 return Min(myMaxTol,toler);