mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +03:00
0025720: Incorrect code of math classes can lead to unpredicted behavior of algorithms
The calling of virtual methods has been removed from constructors & destructors: math_BissecNewton math_BrentMinimum math_FRPR math_FunctionSetRoot math_NewtonFunctionSetRoot math_NewtonMinimum math_Powell
This commit is contained in:
@@ -72,15 +72,17 @@ ProjLib_PrjResolve::ProjLib_PrjResolve(const Adaptor3d_Curve& C,const Adaptor3d_
|
||||
// if (!S1.IsDone()) { return; }
|
||||
// }
|
||||
// else {
|
||||
math_NewtonFunctionSetRoot SR (F, Tol, 1.e-10);
|
||||
SR.Perform(F, Start, BInf, BSup);
|
||||
math_NewtonFunctionSetRoot SR (F, Tol, 1.e-10);
|
||||
SR.Perform(F, Start, BInf, BSup);
|
||||
// if (!SR.IsDone()) { return; }
|
||||
if (!SR.IsDone()) {
|
||||
math_FunctionSetRoot S1 (F, Start,Tol, BInf, BSup);
|
||||
if (!S1.IsDone()) { return; }
|
||||
}
|
||||
|
||||
if (!SR.IsDone())
|
||||
{
|
||||
math_FunctionSetRoot S1 (F, Tol);
|
||||
S1.Perform(F, Start, BInf, BSup);
|
||||
|
||||
if (!S1.IsDone())
|
||||
return;
|
||||
}
|
||||
|
||||
mySolution.SetXY(F.Solution().XY());
|
||||
|
||||
|
Reference in New Issue
Block a user