1// Copyright (c) 1999-2014 OPEN CASCADE SAS
2//
3// This file is part of Open CASCADE Technology software library.
4//
5// This library is free software; you can redistribute it and/or modify it under
6// the terms of the GNU Lesser General Public License version 2.1 as published
7// by the Free Software Foundation, with special exception defined in the file
8// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
9// distribution for complete text of the license and disclaimer of any warranty.
10//
11// Alternatively, this file may be used under the terms of Open CASCADE
12// commercial license or contractual agreement.
13
14//=======================================================================
15//function : SetTol3d
16//purpose  :
17//=======================================================================
18
19inline  void ShapeCustom_BSplineRestriction::SetTol3d(const Standard_Real Tol3d)
20{
21  myTol3d = Tol3d;
22}
23
24
25//=======================================================================
26//function : SetTol2d
27//purpose  :
28//=======================================================================
29
30inline  void ShapeCustom_BSplineRestriction::SetTol2d(const Standard_Real Tol2d)
31{
32  myTol2d = Tol2d;
33}
34
35
36//=======================================================================
37//function : ModifyApproxSurfaceFlag
38//purpose  :
39//=======================================================================
40
41inline  Standard_Boolean& ShapeCustom_BSplineRestriction::ModifyApproxSurfaceFlag()
42{
43
44  return myApproxSurfaceFlag;
45}
46
47
48//=======================================================================
49//function : ModifyApproxCurve3dFlag
50//purpose  :
51//=======================================================================
52
53inline  Standard_Boolean& ShapeCustom_BSplineRestriction::ModifyApproxCurve3dFlag()
54{
55  return myApproxCurve3dFlag;
56}
57
58
59//=======================================================================
60//function : ModifyApproxCurve2dFlag
61//purpose  :
62//=======================================================================
63
64inline  Standard_Boolean& ShapeCustom_BSplineRestriction::ModifyApproxCurve2dFlag()
65{
66  return myApproxCurve2dFlag;
67}
68
69
70//=======================================================================
71//function : SetContinuity3d
72//purpose  :
73//=======================================================================
74
75inline  void ShapeCustom_BSplineRestriction::SetContinuity3d(const GeomAbs_Shape Continuity3d)
76{
77  myContinuity3d = Continuity3d;
78}
79
80
81//=======================================================================
82//function : SetContinuity2d
83//purpose  :
84//=======================================================================
85
86inline  void ShapeCustom_BSplineRestriction::SetContinuity2d(const GeomAbs_Shape Continuity2d)
87{
88  myContinuity2d = Continuity2d;
89}
90
91
92//=======================================================================
93//function : SetMaxDegree
94//purpose  :
95//=======================================================================
96
97inline  void ShapeCustom_BSplineRestriction::SetMaxDegree(const Standard_Integer MaxDegree)
98{
99  myMaxDegree = MaxDegree;
100}
101
102
103//=======================================================================
104//function : SetMaxNbSegments
105//purpose  :
106//=======================================================================
107
108inline  void ShapeCustom_BSplineRestriction::SetMaxNbSegments(const Standard_Integer MaxNbSegments)
109{
110  myNbMaxSeg = MaxNbSegments;
111}
112
113
114//=======================================================================
115//function : Curve3dError
116//purpose  :
117//=======================================================================
118
119inline  Standard_Real ShapeCustom_BSplineRestriction::Curve3dError() const
120{
121  return  myCurve3dError;
122}
123
124
125//=======================================================================
126//function : Curve2dError
127//purpose  :
128//=======================================================================
129
130inline  Standard_Real ShapeCustom_BSplineRestriction::Curve2dError() const
131{
132  return  myCurve2dError;
133}
134
135
136//=======================================================================
137//function : SurfaceError
138//purpose  :
139//=======================================================================
140
141inline  Standard_Real ShapeCustom_BSplineRestriction::SurfaceError() const
142{
143  return mySurfaceError;
144}
145
146//=======================================================================
147//function : SetPriority
148//purpose  :
149//=======================================================================
150
151inline  void ShapeCustom_BSplineRestriction::SetPriority(const Standard_Boolean Degree)
152{
153  myDeg = Degree;
154}
155
156//=======================================================================
157//function : SetConvRational
158//purpose  :
159//=======================================================================
160
161inline  void ShapeCustom_BSplineRestriction::SetConvRational(const Standard_Boolean Rational)
162{
163  myRational = Rational;
164}
165
166//=======================================================================
167//function : GetRestrictionParameters
168//purpose  :
169//=======================================================================
170
171inline Handle(ShapeCustom_RestrictionParameters) ShapeCustom_BSplineRestriction::
172       GetRestrictionParameters() const
173{
174  return myParameters;
175}
176
177//=======================================================================
178//function : SetRestrictionParameters
179//purpose  :
180//=======================================================================
181
182inline void ShapeCustom_BSplineRestriction::
183  SetRestrictionParameters(const Handle(ShapeCustom_RestrictionParameters)& aModes)
184{
185  myParameters = aModes;
186}
187