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