Correction of testing case for issue 24374
[occt.git] / tests / bugs / vis / bug1174
1 puts "================"
2 puts "OCC1174"
3 puts "================"
4 puts ""
5 ########################################################################################
6 # puts "Impossible to set different properties for different sides of a (sur)face"
7 ########################################################################################
8
9 set x 200
10 set y 200
11
12 set Black_R 0
13 set Black_G 0
14 set Black_B 0
15
16 restore [locate_data_file OCC1174.brep] a
17 vinit
18 OCC1174_1 a
19 vdisplay a
20 vfit
21
22 set scale    2.50501
23 set center_X 191.285
24 set center_Y 76.6556
25 set proj_X   0.672033
26 set proj_Y   -0.721033
27 set proj_Z   0.168771
28 set up_X     -0.131494
29 set up_Y     0.108095
30 set up_Z     0.985406
31 set at_X     -27.258
32 set at_Y     30.2321
33 set at_Z     -9.0201
34
35 vviewparams ${scale} ${center_X} ${center_Y} ${proj_X} ${proj_Y} ${proj_Z} ${up_X} ${up_Y} ${up_Z} ${at_X} ${at_Y} ${at_Z}
36
37 set x_GREEN 300
38 set y_GREEN 180
39
40 set x_BLUE 180
41 set y_BLUE 250
42
43 set ColorList1 [QAGetPixelColor ${x_GREEN} ${y_GREEN}]
44 regexp {RED +: +([-0-9.+eE]+)} $ColorList1 full RED_1
45 regexp {GREEN +: +([-0-9.+eE]+)} $ColorList1 full GREEN_1
46 regexp {BLUE +: +([-0-9.+eE]+)} $ColorList1 full BLUE_1
47
48 set ColorList2 [QAGetPixelColor ${x_BLUE} ${y_BLUE}]
49 regexp {RED +: +([-0-9.+eE]+)} $ColorList2 full RED_2
50 regexp {GREEN +: +([-0-9.+eE]+)} $ColorList2 full GREEN_2
51 regexp {BLUE +: +([-0-9.+eE]+)} $ColorList2 full BLUE_2
52
53 if {${RED_1} == 0 && ${GREEN_1} > 0 && ${BLUE_1} == 0} {
54    set IsGreen 1
55 } else {
56    set IsGreen 0
57 }
58
59 if {${RED_2} == 0 && ${GREEN_2} == 0 && ${BLUE_2} > 0} {
60    set IsBlue 1
61 } else {
62    set IsBlue 0
63 }
64
65 if {${IsGreen} == 1 && ${IsBlue} == 1} {
66    puts "OCC1174: OK"
67 } else {
68    puts "OCC1174: Error"
69 }
70
71 set only_screen 1