5ce933b3aa02b3a2692643e4b187eb4213157909
[occt.git] / tests / bugs / vis / bug128
1 puts "================"
2 puts "OCC128"
3 puts "================"
4 ###############################################################
5 ## The shading is false: objects seem to be situated in front of the others while they are behind.
6 ###############################################################
7
8 if { [array get env os_type] != "" } {
9     set os $env(os_type)
10 }
11 if { [string compare $os "windows"] == 0 } {
12    set rd_ch 43137
13    set gr_ch 48235
14    set bl_ch 54117
15 } else {
16    set rd_ch 43137
17    set gr_ch 48235
18    set bl_ch 54509
19 }
20
21 vinit
22 OCC128
23 QASetViewCharac 4.9487928 89.23589 4.1505 0.7329295 0.59461397 0.33052679 -0.536849 0.2071041 0.81786 71.971878 -17.250309 33.509651
24 QAUpdateLights
25 set color [QAGetPixelColor 171 171]
26 regexp {RED +: +([-0-9.+eE]+)} $color full rd
27 regexp {GREEN +: +([-0-9.+eE]+)} $color full gr
28 regexp {BLUE +: +([-0-9.+eE]+)} $color full bl
29
30 set rd_int [expr int($rd * 1.e+05)]
31 set gr_int [expr int($gr * 1.e+05)]
32 set bl_int [expr int($bl * 1.e+05)]
33
34 if { ${rd_int} != ${rd_ch} || ${gr_int} != ${gr_ch} || ${bl_int} != ${bl_ch} } {
35     puts "Error : The shading is false. Colors are not equal"
36 }
37
38 set only_screen 1