1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

0028856: Extrema between two curves gives wrong result

Treatment for large Lipschitz constant is added
Test case is added
This commit is contained in:
ifv
2017-06-15 11:53:29 +03:00
committed by bugmaster
parent 1eeef710bb
commit 35dced1c14
3 changed files with 27 additions and 4 deletions

View File

@@ -211,6 +211,7 @@ void Extrema_GenExtCC::Perform()
C2.Intervals(anIntervals2, aContinuity);
// Lipchitz constant computation.
const Standard_Real aMaxLC = 10000.;
Standard_Real aLC = 9.0; // Default value.
const Standard_Real aMaxDer1 = 1.0 / C1.Resolution(1.0);
const Standard_Real aMaxDer2 = 1.0 / C2.Resolution(1.0);
@@ -226,6 +227,11 @@ void Extrema_GenExtCC::Perform()
{
isConstLockedFlag = Standard_True;
}
if (aMaxDer > aMaxLC)
{
aLC = aMaxLC;
isConstLockedFlag = Standard_True;
}
if (C1.GetType() == GeomAbs_Line)
{
aMaxDer = 1.0 / C2.Resolution(1.0);