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 | |
ccadc126 |
41 | set ColorList1 [vreadpixel ${x_GREEN} ${y_GREEN} rgb] |
42 | set RED_1 [lindex $ColorList1 0] |
43 | set GREEN_1 [lindex $ColorList1 1] |
44 | set BLUE_1 [lindex $ColorList1 2] |
61c421bf |
45 | |
ccadc126 |
46 | set ColorList2 [vreadpixel ${x_BLUE} ${y_BLUE} rgb] |
47 | set RED_2 [lindex $ColorList2 0] |
48 | set GREEN_2 [lindex $ColorList2 1] |
49 | set BLUE_2 [lindex $ColorList2 2] |
61c421bf |
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 | |
5747059b |
69 | checkview -screenshot -3d -path ${imagedir}/${test_image}.png |