diff --git a/src/Extrema/Extrema_FuncExtPC.gxx b/src/Extrema/Extrema_FuncExtPC.gxx index 9869e239cc..1f9753985c 100755 --- a/src/Extrema/Extrema_FuncExtPC.gxx +++ b/src/Extrema/Extrema_FuncExtPC.gxx @@ -316,7 +316,9 @@ Standard_Boolean Extrema_FuncExtPC::Values (const Standard_Real U, Standard_Real if(myU-myUinfium < 2*aDelta) { F1=F; - const Standard_Real U1 = myU, U2 = myU+aDelta, U3 = myU+2*aDelta; + //const Standard_Real U1 = myU; + const Standard_Real U2 = myU + aDelta; + const Standard_Real U3 = myU + aDelta * 2.0; if(!((Value(U2,F2)) && (Value(U3,F3)))) { @@ -337,8 +339,10 @@ Standard_Boolean Extrema_FuncExtPC::Values (const Standard_Real U, Standard_Real else { F3 = F; - const Standard_Real U1 = myU-2*aDelta, U2 = myU-aDelta, U3 = myU; - + const Standard_Real U1 = myU - aDelta * 2.0; + const Standard_Real U2 = myU - aDelta; + //const Standard_Real U3 = myU; + if(!((Value(U2,F2)) && (Value(U1,F1)))) { #ifdef DEB diff --git a/src/Extrema/Extrema_GExtPC.gxx b/src/Extrema/Extrema_GExtPC.gxx index 54b87d46f2..e27e64382c 100755 --- a/src/Extrema/Extrema_GExtPC.gxx +++ b/src/Extrema/Extrema_GExtPC.gxx @@ -105,7 +105,6 @@ void Extrema_GExtPC::Perform(const ThePoint& P) n = TheCurveTool::NbIntervals(*((TheCurve*)myC), GeomAbs_C2); TColStd_Array1OfReal theInter(1, n+1); Standard_Boolean isPeriodic = TheCurveTool::IsPeriodic(*((TheCurve*)myC)); - Standard_Real aPeriodicShift = 0.; TheCurveTool::Intervals(*((TheCurve*)myC), theInter, GeomAbs_C2); mysample = Max(mysample/n, 17); TheVector V1; diff --git a/src/Extrema/Extrema_GenExtCC.gxx b/src/Extrema/Extrema_GenExtCC.gxx index 5977910ff8..03daf93290 100755 --- a/src/Extrema/Extrema_GenExtCC.gxx +++ b/src/Extrema/Extrema_GenExtCC.gxx @@ -146,8 +146,6 @@ a- Constitution du tableau des distances (TbDist2(0,NbU+1,0,NbV+1)): aCache2->CalculatePoints(); // Calcul des distances - const Curve1& aCurve1 = *((Curve1*)(myF.CurvePtr (1))); - const Curve2& aCurve2 = *((Curve1*)(myF.CurvePtr (2))); const Handle(ArrayOfPnt)& aPntArray1 = aCache1->Points(); const Handle(ArrayOfPnt)& aPntArray2 = aCache2->Points(); Standard_Integer NoU, NoV; diff --git a/src/Extrema/Extrema_GenExtPS.cxx b/src/Extrema/Extrema_GenExtPS.cxx index 926202f7c2..82982b6d49 100755 --- a/src/Extrema/Extrema_GenExtPS.cxx +++ b/src/Extrema/Extrema_GenExtPS.cxx @@ -752,7 +752,6 @@ void Extrema_GenExtPS::FindSolution(const gp_Pnt& /*P*/, Tol(2) = mytolv; math_Vector UV(1, 2); - theParams.Parameter(UV(1), UV(2)); math_Vector UVinf(1,2), UVsup(1,2); @@ -761,15 +760,9 @@ void Extrema_GenExtPS::FindSolution(const gp_Pnt& /*P*/, UVsup(1) = myusup; UVsup(2) = myvsup; - math_Vector errors(1,2); - math_Vector root(1, 2); + const Standard_Integer aNbMaxIter = 100; + math_FunctionSetRoot S (myF, UV, Tol, UVinf, UVsup, aNbMaxIter); - Standard_Integer aNbMaxIter = 100; - - gp_Pnt PStart = theParams.Value(); - - math_FunctionSetRoot S (myF,UV,Tol,UVinf,UVsup, aNbMaxIter); - myDone = Standard_True; }