Adding test cases from grid chl
[occt.git] / tests / bugs / vis / bug173_1
1 puts "TODO OCC12345 ALL: Faulty shapes in variables faulty_1 to faulty_"
2 puts "========"
3 puts "OCC173"
4 puts "(case 1)"
5 puts "========"
6 puts ""
7 ###########################################################
8 ## Impossible to change the material or the transparency of the attached BREP shape. 
9 ###########################################################
10
11 restore [locate_data_file OCC173.brep] result
12 puts [checkshape result]
13
14 vinit result
15 tclean 
16 vdisplay result
17 vfit
18 vsetdispmode result 1
19
20 set rd_ch 100000
21 set gr_ch 75686
22 set bl_ch 15294
23
24 QAUpdateLights
25 set color1 [QAGetPixelColor 175 195]
26 regexp {RED +: +([-0-9.+eE]+)} $color1 full rd1
27 regexp {GREEN +: +([-0-9.+eE]+)} $color1 full gr1
28 regexp {BLUE +: +([-0-9.+eE]+)} $color1 full bl1
29
30 set rd_int [expr int($rd1 * 1.e+05)]
31 set gr_int [expr int($gr1 * 1.e+05)]
32 set bl_int [expr int($bl1 * 1.e+05)]
33
34 if { ${rd_int} != ${rd_ch} || ${gr_int} != ${gr_ch} || ${bl_int} != ${bl_ch} } {
35     puts "Error : colors are not equal"
36     puts "Error : Shading is missing in 3D Viewer"
37 }
38
39 ########################################################
40 vsetmaterial result COPPER
41
42 QAUpdateLights
43 set color2 [QAGetPixelColor 175 195]
44 regexp {RED +: +([-0-9.+eE]+)} $color2 full rd2
45 regexp {GREEN +: +([-0-9.+eE]+)} $color2 full gr2
46 regexp {BLUE +: +([-0-9.+eE]+)} $color2 full bl2
47
48 if { ${rd2} == ${rd1} || ${gr2} == ${gr1} || ${bl2} == ${bl1} } {
49     puts "Error : material of shape was NOT changed"
50 }
51
52 set only_screen 1