mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-05 18:16:23 +03:00
0025711: Get rid of static variable islambdadefined in AppParCurves_BSpGradient.gxx
This commit is contained in:
parent
bdde45c38c
commit
89bc1237a4
@ -179,6 +179,7 @@ MError3d: Real;
|
|||||||
MError2d: Real;
|
MError2d: Real;
|
||||||
mylambda1: Real;
|
mylambda1: Real;
|
||||||
mylambda2: Real;
|
mylambda2: Real;
|
||||||
|
myIsLambdaDefined: Boolean;
|
||||||
Done: Boolean;
|
Done: Boolean;
|
||||||
|
|
||||||
end BSpGradient from AppParCurves;
|
end BSpGradient from AppParCurves;
|
||||||
|
@ -43,9 +43,6 @@
|
|||||||
static OSD_Chronometer chr1;
|
static OSD_Chronometer chr1;
|
||||||
|
|
||||||
|
|
||||||
static Standard_Boolean islambdadefined = Standard_False;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static AppParCurves_Constraint FirstConstraint
|
static AppParCurves_Constraint FirstConstraint
|
||||||
(const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints,
|
(const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints,
|
||||||
@ -104,7 +101,10 @@ AppParCurves_BSpGradient::
|
|||||||
const Standard_Real Tol3d,
|
const Standard_Real Tol3d,
|
||||||
const Standard_Real Tol2d,
|
const Standard_Real Tol2d,
|
||||||
const Standard_Integer NbIterations):
|
const Standard_Integer NbIterations):
|
||||||
ParError(FirstPoint, LastPoint,0.0)
|
ParError(FirstPoint, LastPoint,0.0),
|
||||||
|
mylambda1(0.0),
|
||||||
|
mylambda2(0.0),
|
||||||
|
myIsLambdaDefined(Standard_False)
|
||||||
{
|
{
|
||||||
Perform(SSP, FirstPoint, LastPoint, TheConstraints, Parameters,
|
Perform(SSP, FirstPoint, LastPoint, TheConstraints, Parameters,
|
||||||
Knots, Mults, Deg, Tol3d, Tol2d, NbIterations);
|
Knots, Mults, Deg, Tol3d, Tol2d, NbIterations);
|
||||||
@ -125,11 +125,11 @@ AppParCurves_BSpGradient::
|
|||||||
const Standard_Integer NbIterations,
|
const Standard_Integer NbIterations,
|
||||||
const Standard_Real lambda1,
|
const Standard_Real lambda1,
|
||||||
const Standard_Real lambda2):
|
const Standard_Real lambda2):
|
||||||
ParError(FirstPoint, LastPoint,0.0)
|
ParError(FirstPoint, LastPoint,0.0),
|
||||||
|
mylambda1(lambda1),
|
||||||
|
mylambda2(lambda2),
|
||||||
|
myIsLambdaDefined(Standard_True)
|
||||||
{
|
{
|
||||||
mylambda1 = lambda1;
|
|
||||||
mylambda2 = lambda2;
|
|
||||||
islambdadefined = Standard_True;
|
|
||||||
Perform(SSP, FirstPoint, LastPoint, TheConstraints, Parameters,
|
Perform(SSP, FirstPoint, LastPoint, TheConstraints, Parameters,
|
||||||
Knots, Mults, Deg, Tol3d, Tol2d, NbIterations);
|
Knots, Mults, Deg, Tol3d, Tol2d, NbIterations);
|
||||||
}
|
}
|
||||||
@ -207,7 +207,7 @@ void AppParCurves_BSpGradient::
|
|||||||
if (FirstCons >= AppParCurves_TangencyPoint ||
|
if (FirstCons >= AppParCurves_TangencyPoint ||
|
||||||
LastCons >= AppParCurves_TangencyPoint) {
|
LastCons >= AppParCurves_TangencyPoint) {
|
||||||
|
|
||||||
if (!islambdadefined) {
|
if (!myIsLambdaDefined) {
|
||||||
AppParCurves_BSpParLeastSquare thefitt(SSP, Knots, Mults, FirstPoint,
|
AppParCurves_BSpParLeastSquare thefitt(SSP, Knots, Mults, FirstPoint,
|
||||||
LastPoint, FirstCons, LastCons,
|
LastPoint, FirstCons, LastCons,
|
||||||
Parameters, nbpoles);
|
Parameters, nbpoles);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user