mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-05 18:16:23 +03:00
44 lines
1.2 KiB
Plaintext
Executable File
44 lines
1.2 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"
|
|
}
|
|
|
|
checkview -display result -2d -path ${imagedir}/${test_image}.png
|