Adding test cases from grid chl
[occt.git] / tests / bugs / vis / bug185
CommitLineData
a87752f3 1puts "========"
2puts "OCC185"
3puts "========"
4
5pload XDE
6
7igesbrep [locate_data_file OCC185.igs] a *
8
9tpcompound result
10tclean result
11
12vinit
13vdisplay result
14vfit
15
16set rd_ch 78039
17set gr_ch 55294
18set bl_ch 9411
19
20vsetdispmode result 1
21QAUpdateLights
22set color [QAGetPixelColor 235 214]
23regexp {RED +: +([-0-9.+eE]+)} $color full rd
24regexp {GREEN +: +([-0-9.+eE]+)} $color full gr
25regexp {BLUE +: +([-0-9.+eE]+)} $color full bl
26
27set rd_int [expr int($rd * 1.e+05)]
28set gr_int [expr int($gr * 1.e+05)]
29set bl_int [expr int($bl * 1.e+05)]
30
31if { ${rd_int} != ${rd_ch} || ${gr_int} != ${gr_ch} || ${bl_int} != ${bl_ch} } {
32 puts "Error : colors are not equal"
33 puts "Error : Shading is OFF, but should be ON"
34}
35
36vsetdispmode result 0
37
38QAUpdateLights
39set color0 [QAGetPixelColor 235 214]
40regexp {RED +: +([-0-9.+eE]+)} $color0 full rd0
41regexp {GREEN +: +([-0-9.+eE]+)} $color0 full gr0
42regexp {BLUE +: +([-0-9.+eE]+)} $color0 full bl0
43
44if { ${rd0} != 0 || ${gr0} != 1 || ${bl0} != 0 } {
45 puts "Error : colors are not equal"
46 puts "Error : Shading is ON, but should be OFF"
47}
48
49set only_screen 1