0024161: boolean operation hanging
authornbv <nbv@opencascade.com>
Thu, 30 Apr 2015 10:57:03 +0000 (13:57 +0300)
committerbugmaster <bugmaster@opencascade.com>
Thu, 30 Apr 2015 10:58:51 +0000 (13:58 +0300)
The reason of hanging has been eliminated.

Test case for issue CR24161

Small correction of test case for this issue

src/IntWalk/IntWalk_PWalking.cxx
tests/bugs/modalg_6/bug24161 [new file with mode: 0644]

index 539b1ee..f870367 100644 (file)
@@ -1003,28 +1003,18 @@ void IntWalk_PWalking::Perform(const TColStd_Array1OfReal& ParDep,
 
             if(LevelOfIterWithoutAppend > 5)
             {
-              if(pasSav[0]<pasInit[0])
+              for (Standard_Integer i = 0; i < 4; i++)
               {
-                pasInit[0]-=(pasInit[0]-pasSav[0])*0.25;
-                LevelOfIterWithoutAppend=0;
-              }
+                if (pasSav[i] > pasInit[i])
+                  continue;
 
-              if(pasSav[1]<pasInit[1])
-              {
-                pasInit[1]-=(pasInit[1]-pasSav[1])*0.25;
-                LevelOfIterWithoutAppend=0;
-              }
+                const Standard_Real aDelta = (pasInit[i]-pasSav[i])*0.25;
 
-              if(pasSav[2]<pasInit[2])
-              {
-                pasInit[2]-=(pasInit[2]-pasSav[2])*0.25;
-                LevelOfIterWithoutAppend=0;
-              }
-
-              if(pasSav[3]<pasInit[3])
-              {
-                pasInit[3]-=(pasInit[3]-pasSav[3])*0.25;
-                LevelOfIterWithoutAppend=0;
+                if(aDelta > Epsilon(pasInit[i]))
+                {
+                  pasInit[i] -= aDelta;
+                  LevelOfIterWithoutAppend=0;
+                }
               }
             }
 
diff --git a/tests/bugs/modalg_6/bug24161 b/tests/bugs/modalg_6/bug24161
new file mode 100644 (file)
index 0000000..4bf77d1
--- /dev/null
@@ -0,0 +1,23 @@
+puts "=========="
+puts "OCC24161"
+puts "=========="
+puts ""
+###########################################
+# boolean operation hanging
+###########################################
+
+cpulimit 100
+
+restore [locate_data_file bug24161_MirrorSolids.brep] m
+explode m
+
+bop m_1 m_2
+bopfuse result
+
+checkshape result
+bopargcheck result
+
+smallview
+donly result
+
+set only_screen_axo 1