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