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