0031492: BRepBuilderAPI_MakeFace crashes on a wire
[occt.git] / tests / bugs / modalg_7 / bug24251
1 puts "REQUIRED All: Faulty shapes in variables faulty_1 to faulty_"
2
3 #puts "TODO OCC24251 ALL: ERROR: OCC24251 is reproduced."
4
5 puts "========"
6 puts "OCC24251"
7 puts "========"
8 puts ""
9 #############################################################################
10 # Command checkshape does not report a problem on first call after fixshape
11 #############################################################################
12
13 restore [locate_data_file bug24899_TheHull.brep] r0
14
15 # First usage of checkshape command for r0
16 set bug_info_initial [checkshape r0]
17
18 # Calculate number of problematic sub-shapes before using fixshape command
19 set bug_info_initial [lindex $bug_info_initial [expr {[llength $bug_info_initial] - 1}]]
20 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}]]]
21
22 fixshape r r0
23
24 # Second usage of checkshape command for r0
25 set bug_info_final [checkshape r0]
26
27 # ERROR if "This shape seems to be valid" after checkshape command
28 if {$bug_info_final == "This shape seems to be valid"} {
29   puts "ERROR: OCC24251 is reproduced. Second usage of checkshape command does not show problems"
30 } else {
31 # Calculate number of problematic sub-shapes on after using fixshape command
32   set bug_info_final [lindex $bug_info_final [expr {[llength $bug_info_final] - 1}]]
33   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}]]]
34 # ERROR if result of first usage checkshape command is different from the second usage
35   if {$bug_info_final != $bug_info_initial} {
36     puts "ERROR: OCC24251 is reproduced. Second usage of checkshape command shows $bug_info_final problems, but first usage shows $bug_info_initial"
37   }
38 }