Adjusting testing cases for current state of OCCT
[occt.git] / tests / bugs / vis / bug23120
CommitLineData
e84189c5 1puts "============"
2puts "OCC23120"
3puts "============"
4puts ""
5###########################################################################
6# Transform persistence is not restored
7###########################################################################
8
9pload QAcommands
10
11box b1 10 20 30
12box b2 10 20 30
13ttranslate b2 50 50 0
14vinit
15vdisplay b1
16# This line breaks normal rendering
17# of all subsequently displayed presentations
18vsettransmode b1 32 0 0 0 0 0
19# This box is drawn incorrectly due to the bug
20vdisplay b2
21vfit
22vsetdispmode 1
23vzoom 0.5
24vpan 100 0
25
26set x1 300
27set y1 130
28if { [string compare $tcl_platform(os) "Windows NT"] == 0 } {
29 puts "STATION IS WNT"
30 set r_check 0.77646999999999999
31 set g_check 0.54901900000000003
32 set b_check 0.090195999999999998
33} else {
34 set r_check 0.78039199999999997
35 set g_check 0.55294100000000002
36 set b_check 0.094117000000000006
37}
38
bba05040 39set r_check [expr int($r_check * 1.e5)]
40set g_check [expr int($g_check * 1.e5)]
41set b_check [expr int($b_check * 1.e5)]
42
43puts "r_check=$r_check"
44puts "g_check=$g_check"
45puts "b_check=$b_check"
46
e84189c5 47set color1 [ QAGetPixelColor ${x1} ${y1} ]
48
49regexp {RED +: +([-0-9.+eE]+)} $color1 full rd1
50regexp {GREEN +: +([-0-9.+eE]+)} $color1 full gr1
51regexp {BLUE +: +([-0-9.+eE]+)} $color1 full bl1
52
bba05040 53set rd1 [expr int($rd1 * 1.e5)]
54set gr1 [expr int($gr1 * 1.e5)]
55set bl1 [expr int($bl1 * 1.e5)]
56
e84189c5 57puts "rd1=$rd1"
58puts "gr1=$gr1"
59puts "bl1=$bl1"
60
61set status1 0
62if { $rd1 != $r_check || $gr1 != $g_check || $bl1 != $b_check } {
63 puts "Error : colors are not equal"
64 puts "Error : Transform persistence is not restored"
65} else {
66 puts "OK : colors are equal"
67 puts "OK : Transform persistence is restored"
68}
69
70set 3dviewer 2