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