0025987: Integration part of modified unstable test cases
[occt.git] / tests / bugs / vis / bug12121
CommitLineData
3bea4c16 1puts "================"
2puts "OCC12121"
3puts "================"
4puts ""
5#######################################################################################
6# Optimization of existing selection classes
7######################################################################################
8
9set BugNumber OCC12121
10set x1 226
11set y1 154
12
13set x2 300
14set y2 187
15
16set x3 183
17set y3 269
18
19set x_vertex_obj 330
20set y_vertex_obj 212
21set x_vertex_new 184
22set y_vertex_new 268
23
24set x_edge_obj 296
25set y_edge_obj 155
26set x_edge_new 205
27set y_edge_new 240
28
29set x_wire_obj 298
30set y_wire_obj 209
31set x_wire_new 55
32set y_wire_new 236
33
34set x_face_obj 169
35set y_face_obj 146
36set x_face_new 204
37set y_face_new 238
38
39set x_shell_obj 224
40set y_shell_obj 148
41set x_shell_new 230
42set y_shell_new 268
43
44set x_solid_obj 329
45set y_solid_obj 218
46set x_solid_new 168
47set y_solid_new 256
48
49set R_check 0
50set G_check 1
51set B_check 1
52
53set x_refresh 10
54set y_refresh 10
55
56restore [locate_data_file OCC12121-CrankArm.brep] obj
57vinit
58vdisplay obj
0717ddc1 59vconnect new 50 50 50 obj
3bea4c16 60vfit
61vmoveto $x1 $y1
ccadc126 62set ColorObj1 [vreadpixel ${x2} ${y2} rgb]
63set ColorNew1 [vreadpixel ${x3} ${y3} rgb]
3bea4c16 64
65vselect $x1 $y1
ccadc126 66set ColorObj2 [vreadpixel ${x2} ${y2} rgb]
67set ColorNew2 [vreadpixel ${x3} ${y3} rgb]
3bea4c16 68
0717ddc1 69puts "Check vconnect command"
70set status_vconnect 0
3bea4c16 71if { ${ColorObj1} == ${ColorNew1} && ${ColorObj2} == ${ColorNew2} } {
0717ddc1 72 set status_vconnect 0
3bea4c16 73} else {
0717ddc1 74 set status_vconnect 1
3bea4c16 75}
76
77vselect ${x_refresh} ${y_refresh}
78vselmode 1 1
79vmoveto ${x_vertex_obj} ${y_vertex_obj}
80checkcolor ${x_vertex_obj} ${y_vertex_obj} ${R_check} ${G_check} ${B_check}
81vmoveto ${x_vertex_new} ${y_vertex_new}
82checkcolor ${x_vertex_new} ${y_vertex_new} ${R_check} ${G_check} ${B_check}
83
84vselmode 1 0
85vselmode 2 1
86vmoveto ${x_edge_obj} ${y_edge_obj}
87checkcolor ${x_edge_obj} ${y_edge_obj} ${R_check} ${G_check} ${B_check}
88vmoveto ${x_edge_new} ${y_edge_new}
89checkcolor ${x_edge_new} ${y_edge_new} ${R_check} ${G_check} ${B_check}
90
91vselmode 2 0
92vselmode 3 1
93vmoveto ${x_wire_obj} ${y_wire_obj}
94checkcolor ${x_wire_obj} ${y_wire_obj} ${R_check} ${G_check} ${B_check}
95vmoveto ${x_wire_new} ${y_wire_new}
96checkcolor ${x_wire_new} ${y_wire_new} ${R_check} ${G_check} ${B_check}
97
98vselmode 3 0
99vselmode 4 1
100vmoveto ${x_face_obj} ${y_face_obj}
101checkcolor ${x_face_obj} ${y_face_obj} ${R_check} ${G_check} ${B_check}
102vmoveto ${x_face_new} ${y_face_new}
103checkcolor ${x_face_new} ${y_face_new} ${R_check} ${G_check} ${B_check}
104
105vselmode 4 0
106vselmode 5 1
107vmoveto ${x_shell_obj} ${y_shell_obj}
108checkcolor ${x_shell_obj} ${y_shell_obj} ${R_check} ${G_check} ${B_check}
109vmoveto ${x_shell_new} ${y_shell_new}
110checkcolor ${x_shell_new} ${y_shell_new} ${R_check} ${G_check} ${B_check}
111
112vselmode 5 0
113vselmode 6 1
114vmoveto ${x_solid_obj} ${y_solid_obj}
115checkcolor ${x_solid_obj} ${y_solid_obj} ${R_check} ${G_check} ${B_check}
116vmoveto ${x_solid_new} ${y_solid_new}
117checkcolor ${x_solid_new} ${y_solid_new} ${R_check} ${G_check} ${B_check}
118
119vselmode 6 0
120vselmode obj 1
121vselect ${x_refresh} ${y_refresh}
122
123##Resume
124puts ""
0717ddc1 125if { ${status_vconnect} == 1 } {
3bea4c16 126 puts "OK ${BugNumber}"
127} else {
128 puts "Faulty ${BugNumber}"
129}
130
131set only_screen 1