0027176: Configuration, CMake - INSTALL_DIR is a common prefix for all other install...
[occt.git] / tests / bugs / vis / bug26719_1
1 puts "============"
2 puts "CR26719"
3 puts "============"
4 puts ""
5
6 ##########################################################################################
7 puts "Visualization - cannot pick zoom persistent object"
8 ##########################################################################################
9
10 pload VISUALIZATION MODELING
11
12 vinit
13 vsetdispmode 1
14
15 restore [locate_data_file face1.brep] f
16 vdisplay f
17 box b1 50 50 50
18 vdisplay b1 -trsfPers zoom -trsfPersPos 0 0 0
19
20 vviewparams -scale 588.7 -proj 0.69 -0.64 -0.38
21 vviewparams -up -0.16 -0.32 0.93 -at -0.47 -0.042 0.4
22 vviewparams -eye 0.7 -1.14 -0.17
23
24 # move cursor to the box and check if is highlighted
25 # with dynamic highlight color, check that the face is
26 # not highlighted
27 vmoveto 280 290
28 if {[vreadpixel 290 297 name] != "CYAN1 1"} {
29   puts "ERROR: zoom persistent box is not highlighted dynamically!"
30 }
31 if {[vreadpixel 372 210 name] != "GOLDENROD1 1"} {
32   puts "ERROR: the shape behind zoom persistent object was highlighted instead!"
33 }
34 vdump ${imagedir}/${casename}_1.png
35
36 vmoveto 0 0
37
38 vviewparams -scale 689.79 -proj 0.78 0.63 -0.00067
39 vviewparams -up -0.13 0.16 -0.98 -at -0.36 -0.016 0.31
40 vviewparams -eye 0.96 1.053 0.31
41
42 # check if the depth is calculated correctly on border points
43 # of the objects
44
45 # move to a point on the box and check if it
46 # will be highlighted dynamically
47 vmoveto 264 135
48 if {[vreadpixel 276 142 name] != "CYAN1 1"} {
49   puts "ERROR: zoom persistent box is not highlighted dynamically in precision test!"
50 }
51 if {[vreadpixel 243 123 name] != "LIGHTGOLDENROD1 1"} {
52   puts "ERROR: the shape behind zoom persistent object was highlighted instead in precision test!"
53 }
54 vdump ${imagedir}/${casename}_2.png
55 vmoveto 0 0
56
57 # move to a point on the face and check if it
58 # will be highlighted dynamically
59 vmoveto 263 135
60 if {[vreadpixel 276 142 name] != "GOLDENROD2 1"} {
61   puts "ERROR: zoom persistent box is highlighted instead in precision test!"
62 }
63 if {[vreadpixel 243 123 name] != "CYAN1 1"} {
64   puts "ERROR: the shape behind zoom persistent object was not highlighted dynamically in precision test!"
65 }
66 vdump ${imagedir}/${casename}_3.png
67
68 checkview -screenshot -3d -path ${imagedir}/${test_image}.png