61c421bf |
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 |
61c421bf |
23 | set proj_X 0.672033 |
24 | set proj_Y -0.721033 |
25 | set proj_Z 0.168771 |
26 | set up_X -0.131494 |
27 | set up_Y 0.108095 |
28 | set up_Z 0.985406 |
197ac94e |
29 | set at_X 102.061817325836 |
30 | set at_Y 169.436979868935 |
31 | set at_Z 70.7572056943368 |
61c421bf |
32 | |
197ac94e |
33 | vviewparams -scale ${scale} -proj ${proj_X} ${proj_Y} ${proj_Z} -up ${up_X} ${up_Y} ${up_Z} -at ${at_X} ${at_Y} ${at_Z} |
61c421bf |
34 | |
35 | set x_GREEN 300 |
36 | set y_GREEN 180 |
37 | |
38 | set x_BLUE 180 |
39 | set y_BLUE 250 |
40 | |
61c421bf |
41 | set ColorList1 [QAGetPixelColor ${x_GREEN} ${y_GREEN}] |
42 | regexp {RED +: +([-0-9.+eE]+)} $ColorList1 full RED_1 |
43 | regexp {GREEN +: +([-0-9.+eE]+)} $ColorList1 full GREEN_1 |
44 | regexp {BLUE +: +([-0-9.+eE]+)} $ColorList1 full BLUE_1 |
45 | |
46 | set ColorList2 [QAGetPixelColor ${x_BLUE} ${y_BLUE}] |
47 | regexp {RED +: +([-0-9.+eE]+)} $ColorList2 full RED_2 |
48 | regexp {GREEN +: +([-0-9.+eE]+)} $ColorList2 full GREEN_2 |
49 | regexp {BLUE +: +([-0-9.+eE]+)} $ColorList2 full BLUE_2 |
50 | |
51 | if {${RED_1} == 0 && ${GREEN_1} > 0 && ${BLUE_1} == 0} { |
52 | set IsGreen 1 |
53 | } else { |
54 | set IsGreen 0 |
55 | } |
56 | |
57 | if {${RED_2} == 0 && ${GREEN_2} == 0 && ${BLUE_2} > 0} { |
58 | set IsBlue 1 |
59 | } else { |
60 | set IsBlue 0 |
61 | } |
62 | |
63 | if {${IsGreen} == 1 && ${IsBlue} == 1} { |
64 | puts "OCC1174: OK" |
65 | } else { |
66 | puts "OCC1174: Error" |
67 | } |
68 | |
69 | set only_screen 1 |