From 958afe98a10bf2396ce8fac3543fca90460cfa34 Mon Sep 17 00:00:00 2001 From: apv Date: Tue, 25 Jul 2017 18:22:09 +0300 Subject: [PATCH] Test for 0024251: Command checkshape does not report a problem on first call after fixshape --- tests/bugs/modalg_7/bug24251 | 38 ++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 tests/bugs/modalg_7/bug24251 diff --git a/tests/bugs/modalg_7/bug24251 b/tests/bugs/modalg_7/bug24251 new file mode 100644 index 0000000000..d679cdfb81 --- /dev/null +++ b/tests/bugs/modalg_7/bug24251 @@ -0,0 +1,38 @@ +puts "REQUIRED All: Faulty shapes in variables faulty_1 to faulty_" + +puts "TODO OCC24251 ALL: ERROR: OCC24251 is reproduced." + +puts "========" +puts "OCC24251" +puts "========" +puts "" +############################################################################# +# Command checkshape does not report a problem on first call after fixshape +############################################################################# + +restore [locate_data_file bug24899_TheHull.brep] r0 + +# First usage of checkshape command for r0 +set bug_info_initial [checkshape r0] + +# Calculate number of problematic sub-shapes before using fixshape command +set bug_info_initial [lindex $bug_info_initial [expr {[llength $bug_info_initial] - 1}]] +set bug_info_initial [string trim [string range $bug_info_initial [expr {[string last "_" $bug_info_initial] + 1}] [expr {[string length $bug_info_initial] - 1}]]] + +fixshape r r0 + +# Second usage of checkshape command for r0 +set bug_info_final [checkshape r0] + +# ERROR if "This shape seems to be valid" after checkshape command +if {$bug_info_final == "This shape seems to be valid"} { + puts "ERROR: OCC24251 is reproduced. Second usage of checkshape command does not show problems" +} else { +# Calculate number of problematic sub-shapes on after using fixshape command + set bug_info_final [lindex $bug_info_final [expr {[llength $bug_info_final] - 1}]] + set bug_info_final [string trim [string range $bug_info_final [expr {[string last "_" $bug_info_final] + 1}] [expr {[string length $bug_info_final] - 1}]]] +# ERROR if result of first usage checkshape command is different from the second usage + if {$bug_info_final != $bug_info_initial} { + puts "ERROR: OCC24251 is reproduced. Second usage of checkshape command shows $bug_info_final problems, but first usage shows $bug_info_initial" + } +} -- 2.39.5