0026641: Visualization, TKOpenGl - handle correctly transformation persistence within...
[occt.git] / tests / bugs / vis / bug26344
CommitLineData
825aa485 1puts "============"
2puts "CR26344"
3puts "============"
4puts ""
5
6##########################################################################################
7puts "Visualization - provide a support of zoom persistent selection"
8##########################################################################################
9
10vinit View1 w=409 h=409
11vtrihedron tri
12vpan 50 50
13
91d96372 14box b1 25 25 25
15box b2 25 25 25
825aa485 16box b3 100 100 100
17box b4 100 100 100
18box b5 100 100 100
19
20# 1) Zoom persistence
21vpoint p1 200 200 200
22
23vdisplay b1 -trsfPers zoom -trsfPersPos 200 200 200
24vdisplay b2 -trsfPers zoom -trsfPersPos 200 200 200
91d96372 25vsetlocation b2 -25 -25 -25
825aa485 26
1d92133e 27vmoveto 387 77
28if { ![checkcolor 387 77 0 1 1] } {
825aa485 29 puts "Error picking zoom persistence object"
30}
31
1d92133e 32vmoveto 352 96
33if { ![checkcolor 352 96 0 1 1] } {
825aa485 34 puts "Error picking zoom persistent object with location"
35}
36
37vselect 330 120 400 50
38
1d92133e 39if { ![checkcolor 387 77 0.8 0.8 0.8] || ![checkcolor 352 96 0.8 0.8 0.8] } {
825aa485 40 puts "Error selecting zoom persistence object(s)"
41}
825aa485 42# 2) Rotate persistence
43
44vdisplay b3 -trsfPers rotate -trsfPersPos -200 -200 -200
45vmoveto 160 200
46if { ![checkcolor 160 180 0 1 1] } {
47 puts "Error picking rotate persistence object"
48}
49vselect 130 230 190 170
50if { ![checkcolor 160 180 0.8 0.8 0.8] } {
51 puts "Error selecting rotate persistence object"
52}
53
54# 3) Pan persistence
55
56vdisplay b4 -trsfPers pan
57vmoveto 233 188
58if { ![checkcolor 233 188 0 1 1] } {
59 puts "Error picking pan persistence object"
60}
61vselect 200 230 270 140
62if { ![checkcolor 233 188 0.8 0.8 0.8] } {
63 puts "Error selecting pan persistence object"
64}
65
66# 4) Trihedron persistence
67
68vdisplay b5 -trsfPers trihedron -trsfPersPos -1 -1 300
1d92133e 69vmoveto 132 300
70if { ![checkcolor 132 300 0 1 1] } {
825aa485 71 puts "Error picking trihedron persistence object"
72}
1d92133e 73vselect 50 223 235 395
74if { ![checkcolor 132 300 0.8 0.8 0.8] } {
825aa485 75 puts "Error selecting trihedron persistence object"
76}
77
78vselect 50 380 400 50
79
5747059b 80checkview -screenshot -3d -path ${imagedir}/${test_image}.png