1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-09-03 14:10:33 +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 bugmaster
parent 03383c97c3
commit debc95ee5a
2 changed files with 27 additions and 1 deletions

View File

@@ -407,11 +407,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)
{