1puts "========"
2puts "OCC26426"
3puts "========"
4puts ""
5################################################################################################################
6# Draft angle algorithm modifies input argument + the result of the operation have very large tolerance values
7################################################################################################################
8
9restore [locate_data_file OCC26426-prism_shape.brep] b
10
11set bug_info_0 [tolerance b]
12set bug_info_0 [lindex $bug_info_0 1]
13set 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
15explode b f
16depouille r b 0 0 -1 b_1 -10 0 0 -40 0 0 1
17
18set bug_info_1 [tolerance b]
19set bug_info_1 [lindex $bug_info_1 1]
20set 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
22set bug_info_2 [tolerance r]
23set bug_info_2 [lindex $bug_info_2 1]
24set 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
26if {$bug_info_0 < $bug_info_1} {
27  puts "ERROR: OCC26426 is reproduced. Tolerance has been increased (case 1)."
28}
29
30if {[expr {$bug_info_0 + 0.0000001}] < $bug_info_2} {
31  puts "ERROR: OCC26426 is reproduced. Tolerance has been increased (case 2)."
32}
33