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