1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-03 17:56:21 +03:00
occt/tests/bugs/heal/bug26642
nbv e784d86520 0026642: ShapeUpgrade_UnifySameDomain introduces extremely high vertex tolerances
Algorithm of computation of safe shift value along 2D-line (in order to distance between two points was less than tolerance) has been improved.

Correction of some test cases in accordance with their new behavior.

Test-case for issue #26642

Small correction of test-case

Small correction of test-case bugs heal bug26642
2015-09-17 17:01:13 +03:00

39 lines
1.3 KiB
Plaintext

puts "========"
puts "OCC26642"
puts "========"
puts ""
############################################################################
# ShapeUpgrade_UnifySameDomain introduces extremely high vertex tolerances
############################################################################
restore [locate_data_file bug26656_unify.input.brep] i
set bug_info [tolerance i]
set value_1 [lindex $bug_info 1]
set value_1 [string trim [string range $value_1 [expr {[string first "=" $value_1] + 1}] [expr {[string length $value_1] - 1}]]]
unifysamedom r i
set bug_info [tolerance i]
set value_2 [lindex $bug_info 1]
set value_2 [string trim [string range $value_2 [expr {[string first "=" $value_2] + 1}] [expr {[string length $value_2] - 1}]]]
set bug_info [tolerance r]
set value_3 [lindex $bug_info 1]
set value_3 [string trim [string range $value_3 [expr {[string first "=" $value_3] + 1}] [expr {[string length $value_3] - 1}]]]
if {$value_1 > $value_2} {
set diff_12 [expr {$value_1 - $value_2}]
} else {
set diff_12 [expr {$value_2 - $value_1}]
}
if {$value_1 > $value_3} {
set diff_13 [expr {$value_1 - $value_3}]
} else {
set diff_13 [expr {$value_3 - $value_1}]
}
if {$diff_12 > 1.e-06 || $diff_13 > 1.e-06} {
puts "ERROR: OCC26642 is reproduced. Command unifysamedom works wrongly."
}