7faaccfd |
1 | puts "================" |
2 | puts "OCC1629" |
3 | puts "OCC2707" |
4 | puts "================" |
5 | puts "" |
6 | ####################################################################################### |
7 | # Viewer is always updated on closing local contexts |
8 | ####################################################################################### |
7faaccfd |
9 | |
10 | box b1 10 10 10 |
11 | box b2 50 50 50 10 10 10 |
12 | vinit |
13 | vdisplay b1 b2 |
14 | vfit |
15 | |
16 | # box b2 |
17 | set x1 321 |
18 | set y1 120 |
19 | |
20 | set x2 336 |
21 | set y2 145 |
22 | |
23 | set x3 367 |
24 | set y3 144 |
25 | |
26 | # box b1 |
27 | set x4 44 |
28 | set y4 314 |
29 | |
30 | set x5 72 |
31 | set y5 314 |
32 | |
33 | set Selection_R 0.8 |
34 | set Selection_G 0.8 |
35 | set Selection_B 0.8 |
36 | |
37 | #QASetChoiceMode EDGE ON |
c3282ec1 |
38 | vselmode 2 1 -local |
7faaccfd |
39 | |
40 | set BeforeNbSelected [vnbselected] |
41 | |
42 | vselect 0 0 1 |
43 | |
44 | vselect ${x1} ${y1} 1 |
45 | vselect ${x2} ${y2} 1 |
46 | vselect ${x3} ${y3} 1 |
47 | vselect ${x4} ${y4} 1 |
48 | vselect ${x5} ${y5} 1 |
49 | |
50 | set AfterNbSelected [vnbselected] |
51 | |
52 | checkcolor ${x1} ${y1} ${Selection_R} ${Selection_G} ${Selection_B} |
53 | checkcolor ${x2} ${y2} ${Selection_R} ${Selection_G} ${Selection_B} |
54 | checkcolor ${x3} ${y3} ${Selection_R} ${Selection_G} ${Selection_B} |
55 | checkcolor ${x4} ${y4} ${Selection_R} ${Selection_G} ${Selection_B} |
56 | checkcolor ${x5} ${y5} ${Selection_R} ${Selection_G} ${Selection_B} |
57 | |
58 | if {${BeforeNbSelected} == 0} { |
59 | puts "OCC1629: OK (case 6: before selection)" |
60 | } else { |
61 | puts "OCC1629: Error (case 6: before selection)" |
62 | } |
63 | |
64 | if {${AfterNbSelected} == 5} { |
65 | puts "OCC1629: OK (case 7: after selection)" |
66 | } else { |
67 | puts "OCC1629: Error (case 7: after selection)" |
68 | } |
69 | |
70 | vselmode 0 1 |
71 | |
72 | # |
73 | puts "NOTES:" |
74 | puts "" |
75 | puts "Viewer is not updated on closing local context," |
76 | puts "but we can not check it by automatic test!" |
77 | puts "" |
78 | puts "5 edges must be selected on the viewer," |
79 | puts "but must be CloseNbSelected = 0 !" |
80 | puts "" |
81 | # |
82 | |
83 | set CloseNbSelected [vnbselected] |
84 | |
c3282ec1 |
85 | checkcolor ${x1} ${y1} 1 1 0 |
86 | checkcolor ${x2} ${y2} 1 1 0 |
87 | checkcolor ${x3} ${y3} 1 1 0 |
88 | checkcolor ${x4} ${y4} 1 1 0 |
89 | checkcolor ${x5} ${y5} 1 1 0 |
7faaccfd |
90 | |
91 | if {${CloseNbSelected} == 0} { |
92 | puts "OCC1629: OK (case 13: after close local context)" |
93 | } else { |
94 | puts "OCC1629: Error (case 13: after close local context)" |
95 | } |
96 | |
5747059b |
97 | checkview -screenshot -3d -path ${imagedir}/${test_image}.png |