Restoring test cases removed by last commit.
[occt.git] / tests / bugs / moddata / bug257
CommitLineData
0e94a94e 1puts "TODO OCC12345 ALL: OCC257 - Error : xdelta= 3.6651128509496784"
2puts "TODO OCC12345 ALL: OCC257 - Error : ydelta= 5.840378793387278"
3puts "TODO OCC12345 ALL: OCC257 - Error : zdelta= 1.4898469085120623"
4
5puts "================"
6puts "OCC257"
7puts "================"
8puts ""
9
10restore [locate_data_file OCC257.brep] result
11puts [checkshape result]
12
13set bb [bounding result]
14
15set list [split ${bb}]
16set listLength [llength ${list}]
17if { ${listLength} < 6 } {
18 puts "Error : listLength = ${listLength}"
19}
20
21set x1 [lindex ${list} 0]
22set y1 [lindex ${list} 1]
23set z1 [lindex ${list} 2]
24set x2 [lindex ${list} 3]
25set y2 [lindex ${list} 4]
26set z2 [lindex ${list} 5]
27
28set len [expr ${x2} - ${x1}]
29set width [expr ${y2} - ${y1}]
30set height [expr ${z2} - ${z1}]
31
32set R 180
33
34set xdelta [expr abs(${len} - ${R}) / ${R} * 100]
35set ydelta [expr abs(${width} - ${R}) / ${R} * 100]
36set zdelta [expr abs(${height} - ${R}) / ${R} * 100]
37
38set maxdelta 0.1
39
40if { ${xdelta} > ${maxdelta} } then {puts "OCC257 - Error : xdelta= ${xdelta}"}
41if { ${ydelta} > ${maxdelta} } then {puts "OCC257 - Error : ydelta= ${ydelta}"}
42if { ${zdelta} > ${maxdelta} } then {puts "OCC257 - Error : zdelta= ${zdelta}"}
43
44if { ${xdelta} <= ${maxdelta} && ${ydelta} <= ${maxdelta} && ${zdelta} <= ${maxdelta} } then {
45 puts "OCC257: OK"
46}
47
48set 3dviewer 0
49