1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-06 18:26:22 +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

55 lines
1.5 KiB
Plaintext
Executable File

if { [isdraw result] } {
#check if result is valid
puts "checkshape"
set ch [checkshape result]
puts $ch
if {[info exists command] && ${command} == "mkvolume"} {
set bcheck [bopcheck result]
puts $bcheck
if {![regexp {This shape seems to be OK.} $bcheck]} {
puts "Error: bopcheck failed"
}
}
if { [info exists nbsh_v ] } {
set arr_v [explode result v]
set nb_v [ llength $arr_v ]
if { $nb_v != $nbsh_v } {
puts "Error : The resulting shape is WRONG because it must contain $nbsh_v vertexes instead of $nb_v"
} else {
puts "The resulting shape contains $nb_v vertexes"
}
}
if { [info exists nbsh_e ] } {
set arr_e [explode result e]
set nb_e [ llength $arr_e ]
if { $nb_e != $nbsh_e } {
puts "Error : The resulting shape is WRONG because it must contain $nbsh_e edges instead of $nb_e"
} else {
puts "The resulting shape contains $nb_e edges"
}
}
smallview
if { [info exists display_vertices ] } {
regexp {Mass +: +([-0-9.+eE]+)} [lprops result] full mass
} else {
regexp {Mass +: +([-0-9.+eE]+)} [sprops result] full mass
}
if { [expr $mass != 0] || [info exists show_only_result]} {
donly result
if { [info exists nbsh_v ] } {
explode result v
}
} elseif { [isdraw a] || [isdraw b]} {
donly a b
}
fit
xwd $imagedir/${test_image}.png
}
# to end a test script
puts "TEST COMPLETED"