]> OCCT Git - occt-copy.git/commitdiff
Test for 0030396: Infinite recursion during ShapeFix after BRepAlgoAPI_Cut
authormsv <msv@opencascade.com>
Thu, 20 Dec 2018 14:10:00 +0000 (17:10 +0300)
committermsv <msv@opencascade.com>
Thu, 20 Dec 2018 14:15:56 +0000 (17:15 +0300)
Two test cases are added. One for Boolean operation (it is good, because BO has been fixed already), and another for fixshape operation (it causes Draw crash).

tests/bugs/modalg_7/bug30396_1 [new file with mode: 0644]
tests/bugs/modalg_7/bug30396_2 [new file with mode: 0644]

diff --git a/tests/bugs/modalg_7/bug30396_1 b/tests/bugs/modalg_7/bug30396_1
new file mode 100644 (file)
index 0000000..398a435
--- /dev/null
@@ -0,0 +1,34 @@
+puts "========"
+puts "0030396: Infinite recursion during ShapeFix after BRepAlgoAPI_Cut"
+puts "========"
+puts ""
+
+# With this order of tools the operation produced bad result
+set list(1) {a_2 a_3 a_4 a_5 a_6 a_7}
+# With this order of tools the operation produced good result
+set list(2) {a_6 a_2 a_7 a_3 a_4 a_5}
+
+bfuzzyvalue 1e-2
+bnondestructive 1
+
+for {set i 1} { $i <= 2} {incr i} {
+
+  restore [locate_data_file bug30396.brep] a
+  explode a
+
+  bclearobjects
+  bcleartools
+  baddobjects a_1
+  eval baddtools $list($i)
+  bfillds
+  bbop r_$i 2
+
+  checknbshapes r_$i -solid 1 -shell 1
+  checkshape r_$i
+  if {![regexp "OK" [bopcheck r_$i]]} {
+    puts "Error: result $i is self-interfered shape"
+  }
+}
+
+checkprops r_1 -equal r_2
+checkview -display r_2 -2d -path ${imagedir}/${test_image}.png
diff --git a/tests/bugs/modalg_7/bug30396_2 b/tests/bugs/modalg_7/bug30396_2
new file mode 100644 (file)
index 0000000..5ad8ce4
--- /dev/null
@@ -0,0 +1,11 @@
+puts "========"
+puts "0030396: Infinite recursion during ShapeFix after BRepAlgoAPI_Cut"
+puts "========"
+puts ""
+
+puts "TODO 30396 ALL:TEST INCOMPLETE"
+
+# The shape bug30396_bad_result.brep has been saved in OCCT 7.3, before BO has been fixed.
+restore [locate_data_file bug30396_bad_result.brep] a
+# The Draw crashed here
+fixshape r a