Restoring test cases removed by last commit.
[occt.git] / tests / bugs / moddata / bug566
CommitLineData
f1aa2b62 1pload QAcommands
2
3puts "========"
4puts "OCC566"
5puts "========"
6puts ""
7###############################################
8##BRepBndLib::AddClose builds box larger than BRepBndLib::Add
9###############################################
10
11restore [locate_data_file OCC566.brep] a
12
13set err1 [bounding a]
14set err2 [OCC566 a]
15
16regexp { *([-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
17regexp { *([-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
18
19vertex v1 $v1_x $v1_y $v1_z
20vertex v2 $v2_x $v2_y $v2_z
21
22vertex v3 $v3_x $v3_y $v3_z
23vertex v4 $v4_x $v4_y $v4_z
24
25distmini d1 v1 v2
26distmini d2 v3 v4
27
28regexp {([-0-9.+eE]+)$} [dump d1_val] full dis1
29puts $dis1
30regexp {([-0-9.+eE]+)$} [dump d2_val] full dis2
31puts $dis2
32
33set err [expr 1.*abs((($dis1 - $dis2) / $dis2) * 100)]
34puts ""
35puts [format "Different is %s percents" $err]
36
37if {$err > 1.0} {
38 puts " Faulty OCC566: BRepBndLib::AddClose builds box larger than BRepBndLib::Add - this should not be so!"
39} else {
40 puts " OCC566 OK"
41}
42
43set 2dviewer 0