1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-08 18:40:55 +03:00
ski 58cf74e0c0 0025945: Make stable checking of shape global properties in tests
- Added function checkprops, set default tolerance parameter to 1.0e-4
- Using "area" instead of "square".
- Options "-equal\notequal" isn't used together with "-s" in blend and offset test cases.
- Correct regressions/differences/improvements and CPU problem (set props tolerance to 0.1)
- Corrected test cases to use checkprops proc.
- Correct image difference
- Updated TODOs in test cases.
- Updated test cases to get correct images of result shape
2015-12-10 16:56:03 +03:00

57 lines
1.5 KiB
Plaintext
Executable File

if { [info exists rel_tol] } {
puts "\nChecking triangulation area (triarea command)..."
set rel_err [expr abs([CheckTriArea result $area_eps])]
if { $rel_err > $rel_tol } {
puts "Error : area by triangles differs from the actual area by $rel_err %"
} else {
if { $rel_tol > 1 && $rel_tol < 100 } {
puts "Error: Improvement: The current area difference is $rel_err instead of $rel_tol"
}
}
}
if { [isdraw result] } {
if { [info exists 2dviewer] } {
clear
smallview
donly result
fit
xwd $imagedir/${test_image}.png
}
if { [info exists 3dviewer] } {
#for multiview support: dump result from all opened views
set view_str [vviewlist long]
if { [llength ${view_str}] == 0 } {
vinit
set view_str [vviewlist long]
}
set view_list [regexp -all -inline {\S+} $view_str]
foreach {view_name} $view_list {
vactivate $view_name
vclear
vdisplay result
vsetdispmode 1
vfit
vzfit
vdump $imagedir/${test_image}_[regsub -all {/} $view_name {_}].png
}
}
}
if { [info exists only_screen] } {
#for multiview support: dump result from all opened views
set view_str [vviewlist long]
set view_list [regexp -all -inline {\S+} $view_str]
foreach {view_name} $view_list {
vactivate $view_name
vdump $imagedir/${test_image}_[regsub -all {/} $view_name {_}].png
}
}
if { [info exists only_screen_axo] } {
xwd $imagedir/${test_image}.png
}
# to end a test script
puts "TEST COMPLETED"