0026237: Change platform in TODOs from Debian\Mandriva to Linux
[occt.git] / tests / bugs / vis / bug232
CommitLineData
a87752f3 1puts "========"
2puts "OCC232"
3puts "Pick filter does NOT work for TopAbs_COMPSOLID topology"
4puts "========"
5
6vinit
7OCC232
8vfit
9
10# selected point of first CompSolid
11set x1 69
12set y1 204
13
14set x2 116
15set y2 231
16
17#set x3 160; set y3 257 - it's bad for lin,aki.
18set x3 159
19set y3 256
20
21# selected point of second CompSolid
22set x4 298
23set y4 76
24
25set x5 339
26set y5 100
27
28set x6 381
29set y6 124
30
31set Cyan_R 0
32set Cyan_G 1
33set Cyan_B 1
34
ccadc126 35set Cyan "$Cyan_R $Cyan_G $Cyan_B"
36
a87752f3 37set Yellow_R 1
38set Yellow_G 1
39set Yellow_B 0
40
ccadc126 41set Yellow "$Yellow_R $Yellow_G $Yellow_B"
42
a87752f3 43# There is not selection
44puts "There is not selection"
ccadc126 45set result11 [regexp "$Yellow" [vreadpixel $x1 $y1 rgb]]
46set result12 [regexp "$Yellow" [vreadpixel $x2 $y2 rgb]]
47set result13 [regexp "$Yellow" [vreadpixel $x3 $y3 rgb]]
48set result14 [regexp "$Yellow" [vreadpixel $x4 $y4 rgb]]
49set result15 [regexp "$Yellow" [vreadpixel $x5 $y5 rgb]]
50set result16 [regexp "$Yellow" [vreadpixel $x6 $y6 rgb]]
a87752f3 51
52# Move a mouse
53puts "Move a mouse"
4754e164 54vmoveto $x2 $y2
a87752f3 55
56# Second box of first CompSolid is selected
57puts "Second box of first CompSolid is selected"
ccadc126 58set result21 [regexp "$Yellow" [vreadpixel $x1 $y1 rgb]]
59set result22 [regexp "$Yellow" [vreadpixel $x3 $y3 rgb]]
60set result23 [regexp "$Yellow" [vreadpixel $x4 $y4 rgb]]
61set result24 [regexp "$Yellow" [vreadpixel $x5 $y5 rgb]]
62set result25 [regexp "$Yellow" [vreadpixel $x6 $y6 rgb]]
a87752f3 63
37d6975c 64set env(os_type) $tcl_platform(platform)
65if { [string compare $env(os_type) "windows"] != 0 } {
ccadc126 66 set result31 [regexp "$Cyan" [vreadpixel $x2 $y2 rgb]]
67 if { $result31 == 0 } {
68 set IsFaulty 1
69 }
d27ea0ef 70}
a87752f3 71
72set IsFaulty 0
ccadc126 73if { !($result11 && $result12 && $result13 && $result14 && $result15 && $result16)
74 || !($result21 && $result22 && $result23 && $result24 && $result25) } {
a87752f3 75 set IsFaulty 1
76}
a87752f3 77
78if {$IsFaulty != 0} {
79 puts "Error : OCC232"
80}
81
82set only_screen 1