From 1b25c97fbc79b97d526440cc2ebd07375819b003 Mon Sep 17 00:00:00 2001 From: msv Date: Thu, 20 Dec 2018 17:10:00 +0300 Subject: [PATCH] Test for 0030396: Infinite recursion during ShapeFix after BRepAlgoAPI_Cut 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 | 34 ++++++++++++++++++++++++++++++++++ tests/bugs/modalg_7/bug30396_2 | 11 +++++++++++ 2 files changed, 45 insertions(+) create mode 100644 tests/bugs/modalg_7/bug30396_1 create mode 100644 tests/bugs/modalg_7/bug30396_2 diff --git a/tests/bugs/modalg_7/bug30396_1 b/tests/bugs/modalg_7/bug30396_1 new file mode 100644 index 0000000000..398a435044 --- /dev/null +++ b/tests/bugs/modalg_7/bug30396_1 @@ -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 index 0000000000..5ad8ce4b43 --- /dev/null +++ b/tests/bugs/modalg_7/bug30396_2 @@ -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 -- 2.39.5