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