Files
OCCT/tests/bugs/xde/bug9531
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

58 lines
1.7 KiB
Plaintext
Executable File

puts "TODO OCC12345 ALL: Error : is WRONG because number of "
puts "============"
puts "OCC9531"
puts "============"
puts ""
#######################################################################
# Regression after writing-reading operation
#######################################################################
set BugNumber OCC9531
set IsOk 1
set filepath [locate_data_file 919-001-T02-04-CP-VL.igs]
if {[catch {igesread $filepath OCC9531a *}]} {
puts "Faulty ${BugNumber} : here is reading problem"
set IsOk 0
}
file delete ${imagedir}/OCC9531tmp.igs
if {[catch {brepiges OCC9531a ${imagedir}/OCC9531tmp.igs}]} {
puts "Faulty ${BugNumber} : here is conversation to brep problem"
set IsOk 0
}
catch {exec chmod 777 ${imagedir}/OCC9531tmp.igs}
if {[catch {igesread ${imagedir}/OCC9531tmp.igs OCC9531b *}]} {
puts "Faulty ${BugNumber} : here is 2nd reading problem"
set IsOk 0
}
if { ${IsOk} == 1} {
set aTokList {= }
set Tol1 [lindex [split [tolerance OCC9531a] ${aTokList}] 2]
set Tol2 [lindex [split [tolerance OCC9531b] ${aTokList}] 2]
set percent_max 0.1
set Tolerance_percent [GetPercent ${Tol1} ${Tol2}]
puts "Tolerance_percent = ${Tolerance_percent} %"
if { ${Tolerance_percent} > ${percent_max} } {
set IsOk 0
}
checknbshapes OCC9531a -vertex 5748 -edge 5680 -wire 915 -face 899 -shell 0 -solid 0 -compsolid 0 -compound 1 -shape 13243
checkprops OCC9531a -s 5236.89
checkprops OCC9531b -s 5236.89
checknbshapes OCC9531b -vertex 5748 -edge 5680 -wire 915 -face 899 -shell 0 -solid 0 -compsolid 0 -compound 1 -shape 13243
if { ${IsOk} == 0 } {
puts "${BugNumber}: Faulty"
} else {
puts "${BugNumber}: OK"
}
}
renamevar OCC9531b result
set 2dviewer 0