1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-10 18:51:21 +03:00
apn f1aa2b6272 Adding new testing cases for chl grid
Adding procedures checkcolor and checkpoint.
Modified test cases which are used QAGetPixelColor or QAAISGetPixelColor2d
Allow using command QAAISGetPixelColor2d on WNT
Rename test case tests/bugs/vis/bug19619 to pro19619
Added test cases to modalg and moddata
2012-12-14 16:56:11 +04:00

44 lines
1.1 KiB
Plaintext
Executable File

pload QAcommands
puts "========"
puts "OCC566"
puts "========"
puts ""
###############################################
##BRepBndLib::AddClose builds box larger than BRepBndLib::Add
###############################################
restore [locate_data_file OCC566.brep] a
set err1 [bounding a]
set err2 [OCC566 a]
regexp { *([-0-9.+eE]+) *([-0-9.+eE]+) *([-0-9.+eE]+) *([-0-9.+eE]+) *([-0-9.+eE]+) *([-0-9.+eE]+)} $err1 full v1_x v1_y v1_z v2_x v2_y v2_z
regexp { *([-0-9.+eE]+) *([-0-9.+eE]+) *([-0-9.+eE]+) *([-0-9.+eE]+) *([-0-9.+eE]+) *([-0-9.+eE]+)} $err2 full v3_x v3_y v3_z v4_x v4_y v4_z
vertex v1 $v1_x $v1_y $v1_z
vertex v2 $v2_x $v2_y $v2_z
vertex v3 $v3_x $v3_y $v3_z
vertex v4 $v4_x $v4_y $v4_z
distmini d1 v1 v2
distmini d2 v3 v4
regexp {([-0-9.+eE]+)$} [dump d1_val] full dis1
puts $dis1
regexp {([-0-9.+eE]+)$} [dump d2_val] full dis2
puts $dis2
set err [expr 1.*abs((($dis1 - $dis2) / $dis2) * 100)]
puts ""
puts [format "Different is %s percents" $err]
if {$err > 1.0} {
puts " Faulty OCC566: BRepBndLib::AddClose builds box larger than BRepBndLib::Add - this should not be so!"
} else {
puts " OCC566 OK"
}
set 2dviewer 0