1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-05 18:16:23 +03:00
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

84 lines
2.1 KiB
Plaintext
Executable File

puts "================"
puts "OCC6503"
puts "================"
puts ""
#######################################################################################
# Incorrect calculation of bounding box for infinite surfaces
#######################################################################################
set BugNumber OCC6503
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}
}
plane pl 0 0 0 0 0 1
mkface f pl
set info_result [bounding f]
set x1 [lindex ${info_result} 0]
set y1 [lindex ${info_result} 1]
set z1 [lindex ${info_result} 2]
set x2 [lindex ${info_result} 3]
set y2 [lindex ${info_result} 4]
set z2 [lindex ${info_result} 5]
set good_x1 -1e+100
set good_y1 -1e+100
set good_z1 -9.9999999999999995e-08
set good_x2 1e+100
set good_y2 1e+100
set good_z2 9.9999999999999995e-08
set percent_max 0.1
set status 0
set x1_percent [GetPercent ${x1} ${good_x1}]
set y1_percent [GetPercent ${y1} ${good_y1}]
set z1_percent [GetPercent ${z1} ${good_z1}]
set x2_percent [GetPercent ${x2} ${good_x2}]
set y2_percent [GetPercent ${y2} ${good_y2}]
set z2_percent [GetPercent ${z2} ${good_z2}]
if {${x1_percent} > ${percent_max}} {
puts "Faulty ${BugNumber} : x1 is wrong"
set status 1
}
if {${y1_percent} > ${percent_max}} {
puts "Faulty ${BugNumber} : y1 is wrong"
set status 1
}
if {${z1_percent} > ${percent_max}} {
puts "Faulty ${BugNumber} : z1 is wrong"
set status 1
}
if {${x2_percent} > ${percent_max}} {
puts "Faulty ${BugNumber} : x2 is wrong"
set status 1
}
if {${y2_percent} > ${percent_max}} {
puts "Faulty ${BugNumber} : y2 is wrong"
set status 1
}
if {${z2_percent} > ${percent_max}} {
puts "Faulty ${BugNumber} : z2 is wrong"
set status 1
}
if { ${status} == 0 } {
puts "${BugNumber}: OK"
} else {
puts "${BugNumber}: Faulty"
}
set 3dviewer 0