0024157: Parallelization of assembly part of BO
[occt.git] / src / ShapeUpgrade / ShapeUpgrade_Tool.lxx
CommitLineData
b311480e 1// Created on: 1999-08-31
2// Created by: Pavel DURANDIN
3// Copyright (c) 1999-1999 Matra Datavision
4// Copyright (c) 1999-2012 OPEN CASCADE SAS
5//
6// The content of this file is subject to the Open CASCADE Technology Public
7// License Version 6.5 (the "License"). You may not use the content of this file
8// except in compliance with the License. Please obtain a copy of the License
9// at http://www.opencascade.org and read it completely before using this file.
10//
11// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
13//
14// The Original Code and all software distributed under the License is
15// distributed on an "AS IS" basis, without warranty of any kind, and the
16// Initial Developer hereby disclaims all such warranties, including without
17// limitation, any warranties of merchantability, fitness for a particular
18// purpose or non-infringement. Please see the License for the specific terms
19// and conditions governing the rights and limitations under the License.
20
7fd59977 21
22
23//=======================================================================
24//function : SetContext
25//purpose :
26//=======================================================================
27
28inline void ShapeUpgrade_Tool::SetContext (const Handle(ShapeBuild_ReShape)& context)
29{
30 myContext = context;
31}
32
33
34//=======================================================================
35//function : Context
36//purpose :
37//=======================================================================
38
39inline Handle(ShapeBuild_ReShape) ShapeUpgrade_Tool::Context() const
40{
41 return myContext;
42}
43
44
45//=======================================================================
46//function : SetPrecision
47//purpose :
48//=======================================================================
49
50inline void ShapeUpgrade_Tool::SetPrecision (const Standard_Real preci)
51{
52 myPrecision = preci;
53 if(myMaxTol < myPrecision) myMaxTol = myPrecision;
54 if(myMinTol > myPrecision) myMinTol = myPrecision;
55}
56
57
58//=======================================================================
59//function : Precision
60//purpose :
61//=======================================================================
62
63inline Standard_Real ShapeUpgrade_Tool::Precision() const
64{
65 return myPrecision;
66}
67
68
69//=======================================================================
70//function : SetMinTolerance
71//purpose :
72//=======================================================================
73
74inline void ShapeUpgrade_Tool::SetMinTolerance (const Standard_Real mintol)
75{
76 myMinTol = mintol;
77}
78
79
80//=======================================================================
81//function : MinTolerance
82//purpose :
83//=======================================================================
84
85inline Standard_Real ShapeUpgrade_Tool::MinTolerance() const
86{
87 return myMinTol;
88}
89
90
91//=======================================================================
92//function : SetMaxTolerance
93//purpose :
94//=======================================================================
95
96inline void ShapeUpgrade_Tool::SetMaxTolerance (const Standard_Real maxtol)
97{
98 myMaxTol = maxtol;
99}
100
101
102//=======================================================================
103//function : MaxTolerance
104//purpose :
105//=======================================================================
106
107inline Standard_Real ShapeUpgrade_Tool::MaxTolerance() const
108{
109 return myMaxTol;
110}
111
112//=======================================================================
113//function : LimitTolerance
114//purpose :
115//=======================================================================
116
117inline Standard_Real ShapeUpgrade_Tool::LimitTolerance(const Standard_Real toler) const
118{
119 //only maximal restriction implemented.
120 return Min(myMaxTol,toler);
121}