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:
@@ -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);
|
||||
|
Reference in New Issue
Block a user