1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-04 18:06:22 +03:00
occt/tests/bugs/modalg_2/bug23218
ski 5747059b21 0026833: Create command checkview containing all viewer types
Created command checkview for displaying shapes.
2016-02-05 11:14:37 +03:00

47 lines
1.3 KiB
Plaintext
Executable File

puts "TODO OCC25597 ALL: OCC23218: Faulty"
puts "============"
puts "OCC23218"
puts "============"
puts ""
#######################################################################
# Wrong value of tolerance for the intersection curve.
#######################################################################
set BugNumber OCC23218
puts "Load first shape ..."
restore [locate_data_file bug23218_b1] b1
puts "Load second shape ..."
restore [locate_data_file bug23218_b4] b2
puts "Start project operation ..."
set result [bopcurves b1 b2]
puts $result
puts "Finish project operation ..."
set GoodToleranceReached 6.3315853638232248e-007
regexp {Tolerance Reached=([-0-9.+eE]+)} $result full ToleranceReached
proc GetPercent {Value GoodValue} {
set Percent 0.
if {${GoodValue} != 0.} {
set Percent [expr abs(${Value} - ${GoodValue}) / abs(double(${GoodValue})) * 100.]
} elseif {${Value} != 0.} {
set Percent [expr abs(${GoodValue} - ${Value}) / abs(double(${Value})) * 100.]
} else {
set Percent 0.
}
return ${Percent}
}
set percent_max 0.1
set ToleranceReached_percent [expr abs ( [GetPercent ${ToleranceReached} ${GoodToleranceReached}] ) ]
if {${ToleranceReached_percent} > ${percent_max}} {
puts "${BugNumber}: Faulty"
} else {
puts "OK ${BugNumber}"
}