Adding test cases from grid chl
[occt.git] / tests / bugs / vis / bug146
1
2 puts "================"
3 puts "OCC146"
4 puts "================"
5 ############################################################################
6 ##The first click on shape selects it - it is right. But the second one deselects it and the following clicks have no effect.
7 ############################################################################
8
9 v2dinit
10 box b_b 10 15 20
11 trotate b_b 0 0 0 1 1 1 45
12 v2ddisplay b_b
13 v2dfit
14
15 QASelect2d 155 180
16 QASelect2d 155 180
17 QASelect2d 155 180
18
19 set rd_ch 80000
20 set gr_ch 80000
21 set bl_ch 80000
22
23 set color [QAAISGetPixelColor2d 155 177]
24 regexp {RED +: +([-0-9.+eE]+)} $color full rd
25 regexp {GREEN +: +([-0-9.+eE]+)} $color full gr
26 regexp {BLUE +: +([-0-9.+eE]+)} $color full bl
27
28 set rd_int [expr int($rd * 1.e+05)]
29 set gr_int [expr int($gr * 1.e+05)]
30 set bl_int [expr int($bl * 1.e+05)]
31
32 if { ${rd_int} != ${rd_ch} || ${gr_int} != ${gr_ch} || ${bl_int} != ${bl_ch} } {
33     puts "Error : colors are not equal"
34     puts "Error : The second selection of selected object deselects it and the following clicks have no effect"
35 }
36
37 set only_screen2d 1