1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-14 13:30:48 +03:00

0026484: BRepExtrema_DistShapeShape hangs

Check in math_GlobOptMin::computeGlobalExtremum(...) method if the parameter went out of boundary(-ies).

Added test case bugs/modalg_6/bug26484
This commit is contained in:
nbv
2015-07-29 15:38:41 +03:00
committed by abv
parent a2e99c91fa
commit c19a07bc44
2 changed files with 27 additions and 2 deletions

View File

@@ -397,12 +397,17 @@ void math_GlobOptMin::computeGlobalExtremum(Standard_Integer j)
math_Vector aStepBestPoint(1, myN);
Standard_Boolean isInside = Standard_False;
Standard_Real r;
Standard_Boolean isReached = Standard_False;
for(myX(j) = myA(j) + myE1; myX(j) < myB(j) + myE1; myX(j) += myV(j))
for(myX(j) = myA(j) + myE1;
(myX(j) < myB(j) + myE1) && (!isReached);
myX(j) += myV(j))
{
if (myX(j) > myB(j))
{
myX(j) = myB(j);
isReached = Standard_True;
}
if (j == 1)
{