mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-29 14:00:49 +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:
@@ -346,12 +346,14 @@ void Bisector_Inter::NeighbourPerform(const Handle(Bisector_BisecCC)& Bis1,
|
||||
if (UMin - Eps > UMax + Eps) {return;}
|
||||
|
||||
// Solution F = 0 to find the common point.
|
||||
Bisector_FunctionInter Fint (Guide,Bis1,BisTemp);
|
||||
math_BissecNewton Sol (Fint,UMin,UMax,Tol,20);
|
||||
if (Sol.IsDone()) {
|
||||
USol = Sol.Root();
|
||||
}
|
||||
else { return; }
|
||||
Bisector_FunctionInter Fint(Guide,Bis1,BisTemp);
|
||||
|
||||
math_BissecNewton aSolution(Tol);
|
||||
aSolution.Perform(Fint, UMin, UMax, 20);
|
||||
|
||||
if (aSolution.IsDone())
|
||||
USol = aSolution.Root();
|
||||
else return;
|
||||
|
||||
PSol = BisTemp ->ValueAndDist(USol,U1,U2,Dist);
|
||||
|
||||
|
Reference in New Issue
Block a user