0027532: Errors on reading stp-file
[occt.git] / tests / bugs / modalg_6 / bug26426
1 puts "========"
2 puts "OCC26426"
3 puts "========"
4 puts ""
5 ################################################################################################################
6 # Draft angle algorithm modifies input argument + the result of the operation have very large tolerance values
7 ################################################################################################################
8
9 restore [locate_data_file OCC26426-prism_shape.brep] b
10
11 set bug_info_0 [tolerance b]
12 set bug_info_0 [lindex $bug_info_0 1]
13 set bug_info_0 [string trim [string range $bug_info_0 [expr {[string first "=" $bug_info_0] + 1}] [expr {[string length $bug_info_0] - 1}]]]
14
15 explode b f
16 depouille r b 0 0 -1 b_1 -10 0 0 -40 0 0 1
17
18 set bug_info_1 [tolerance b]
19 set bug_info_1 [lindex $bug_info_1 1]
20 set bug_info_1 [string trim [string range $bug_info_1 [expr {[string first "=" $bug_info_1] + 1}] [expr {[string length $bug_info_1] - 1}]]]
21
22 set bug_info_2 [tolerance r]
23 set bug_info_2 [lindex $bug_info_2 1]
24 set bug_info_2 [string trim [string range $bug_info_2 [expr {[string first "=" $bug_info_2] + 1}] [expr {[string length $bug_info_2] - 1}]]]
25
26 if {$bug_info_0 < $bug_info_1} {
27   puts "ERROR: OCC26426 is reproduced. Tolerance has been increased (case 1)."
28 }
29
30 if {[expr {$bug_info_0 + 0.0000001}] < $bug_info_2} {
31   puts "ERROR: OCC26426 is reproduced. Tolerance has been increased (case 2)."
32 }