mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-10 18:51:21 +03:00
0030176: Modeling Algorithms - Infinite loop in IntWalk_PWalking::Perform()
Currently resetting of counter LevelOfIterWithoutAppend is enabled only if additional iterations have taken some positive effect.
This commit is contained in:
parent
87efa821fa
commit
521648ce02
@ -762,6 +762,9 @@ void IntWalk_PWalking::Perform(const TColStd_Array1OfReal& ParDep,
|
|||||||
Epsilon(VM1 - Vm1),
|
Epsilon(VM1 - Vm1),
|
||||||
Epsilon(UM2 - Um2),
|
Epsilon(UM2 - Um2),
|
||||||
Epsilon(VM2 - Vm2)};
|
Epsilon(VM2 - Vm2)};
|
||||||
|
|
||||||
|
Standard_Integer aPrevNbPoints = line->NbPoints();
|
||||||
|
|
||||||
Arrive = Standard_False;
|
Arrive = Standard_False;
|
||||||
while(!Arrive) //010
|
while(!Arrive) //010
|
||||||
{
|
{
|
||||||
@ -1099,7 +1102,13 @@ void IntWalk_PWalking::Perform(const TColStd_Array1OfReal& ParDep,
|
|||||||
if(aDelta > Epsilon(pasInit[i]))
|
if(aDelta > Epsilon(pasInit[i]))
|
||||||
{
|
{
|
||||||
pasInit[i] -= aDelta;
|
pasInit[i] -= aDelta;
|
||||||
LevelOfIterWithoutAppend=0;
|
if ((aPrevStatus != IntWalk_StepTooSmall) &&
|
||||||
|
(line->NbPoints() != aPrevNbPoints))
|
||||||
|
{
|
||||||
|
LevelOfIterWithoutAppend = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
aPrevNbPoints = line->NbPoints();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1174,8 +1183,13 @@ void IntWalk_PWalking::Perform(const TColStd_Array1OfReal& ParDep,
|
|||||||
// StepTooSmall --> Increase step --> PasTropGrand...)
|
// StepTooSmall --> Increase step --> PasTropGrand...)
|
||||||
// nullify LevelOfIterWithoutAppend only if the condition
|
// nullify LevelOfIterWithoutAppend only if the condition
|
||||||
// is satisfied:
|
// is satisfied:
|
||||||
if (aPrevStatus != IntWalk_PasTropGrand)
|
if ((aPrevStatus != IntWalk_PasTropGrand) &&
|
||||||
|
(line->NbPoints() != aPrevNbPoints))
|
||||||
|
{
|
||||||
LevelOfIterWithoutAppend = 0;
|
LevelOfIterWithoutAppend = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
aPrevNbPoints = line->NbPoints();
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
24
tests/perf/modalg/bug30176
Normal file
24
tests/perf/modalg/bug30176
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
puts "========"
|
||||||
|
puts "0030176: Modeling Algorithms - Infinite loop in IntWalk_PWalking::Perform()"
|
||||||
|
puts "========"
|
||||||
|
puts ""
|
||||||
|
|
||||||
|
restore [locate_data_file bug30176_shape.brep] sshh
|
||||||
|
explode sshh e
|
||||||
|
|
||||||
|
dchrono h1 restart
|
||||||
|
blend result sshh 0.1 sshh_36 0.1 sshh_36 0.1 sshh_38 0.1 sshh_71 0.1 sshh_72 0.1 sshh_73
|
||||||
|
dchrono h1 stop counter BlOp
|
||||||
|
|
||||||
|
checkshape result
|
||||||
|
|
||||||
|
if {[regexp "Faulties" [bopargcheck result]]} {
|
||||||
|
puts "Error: bopargcheck has found some faulties in result"
|
||||||
|
}
|
||||||
|
|
||||||
|
checkmaxtol result -ref 0.0001
|
||||||
|
checknbshapes result -wire 43 -face 43 -shell 1 -solid 1
|
||||||
|
|
||||||
|
checkprops result -s 26.9203 -v 9.40217
|
||||||
|
|
||||||
|
checkview -display result -2d -path ${imagedir}/${test_image}.png
|
Loading…
x
Reference in New Issue
Block a user