1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-05 18:16:23 +03:00
occt/tests/bugs/modalg_2/bug23218
ski a8676008f7 Adding of testing cases from subgroups 937 940 and 941 of CHL group
Splitting of subgroups bugs/modalg and bugs/moddata to optimise time of testing
Correction of end file in group v3d
Small correction of test case
2013-02-08 15:16:15 +04:00

49 lines
1.3 KiB
Plaintext
Executable File

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 8.9651741230950248e-06
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}"
}
set 3dviewer 0