]> OCCT Git - occt-copy.git/commitdiff
test fix CR29093_3
authorakaftasev <akaftasev@opencascade.com>
Mon, 15 Feb 2021 10:25:14 +0000 (13:25 +0300)
committerakaftasev <akaftasev@opencascade.com>
Mon, 15 Feb 2021 10:25:14 +0000 (13:25 +0300)
src/IntWalk/IntWalk_PWalking.cxx

index e9f1efade3b6021fa1ec976724878ccd71bd6ee7..142e0837bda02d42958ccb495bf45cc1745f29f2 100644 (file)
@@ -1703,12 +1703,13 @@ Standard_Boolean IntWalk_PWalking::ExtendLineInCommonZone(const IntImp_ConstIsop
   Standard_Integer nbEqualPoints = 0;
   Standard_Integer parit = 0;
   Standard_Integer uvit = 0;
+  Standard_Integer nbInter = 0;
   IntSurf_SequenceOfPntOn2S aSeqOfNewPoint;
 
   while (!bStop) {
     nbIterWithoutAppend++;
-
-    if((nbIterWithoutAppend > 20) || (nbEqualPoints > 20)) {
+    nbInter++;
+    if((nbIterWithoutAppend > 20) || (nbEqualPoints > 20) || (nbInter > 10000)) {
 #ifdef OCCT_DEBUG
       std::cout<<"Infinite loop detected. Stop iterations (IntWalk_PWalking_1.gxx)" << std::endl;
 #endif