0030523: Visualization - Highlighting does not work anymore
[occt.git] / tests / v3d / manipulator / zoom_persistence
CommitLineData
625e1958 1puts "==============================================="
2puts "AIS_Manipulator - check zoom persistence option"
3puts "==============================================="
4
5set anImage1 $imagedir/${casename}_1.png
6set anImage2 $imagedir/${casename}_2.png
7set anImage3 $imagedir/${casename}_3.png
8set anImage4 $imagedir/${casename}_4.png
9set anImage5 $imagedir/${casename}_5.png
10set anImage6 $imagedir/${casename}_6.png
11
12# -------------------------------------
13# create manipulated and helper objects
14# -------------------------------------
15
16box b1 0 0 0 20 20 20
17box b2 80 0 0 20 20 20
18vdisplay b1
19vdisplay b2
20vtrihedron tri
21vsetdispmode 1
22vaxo
23vfit
24
25# --------------------------------------------------------
26# create and test non-zoom persistent manipulator (test 1)
27# --------------------------------------------------------
28
29vmanipulator m1 -attach b1 -adjustPosition 1 -adjustSize 1 -enableModes 1 -zoomable 1
30
31set mouse_pick_1 {84 135}
32set mouse_pick_2 {29 103}
33set mouse_pick_3 {29 103}
34set mouse_drag_3 {121 126}
35
36# pick at default zoom
37vmoveto 0 0
38vmoveto {*}$mouse_pick_1
39vdump $anImage1
40
41# pick at changed zoom
42vzoom 1.5
43vmoveto 0 0
44vmoveto {*}$mouse_pick_2
45vdump $anImage2
46
47# drag object
48vselect {*}$mouse_pick_3
49vmanipulator m1 -startTransform {*}$mouse_pick_3
50vmanipulator m1 -transform {*}$mouse_drag_3
51vmanipulator m1 -stopTransform
52vselect 0 0
53vdump $anImage3
54
55# ----------------------------------------------------
56# create and test zoom persistent manipulator (test 2)
57# ----------------------------------------------------
58
59vfit
60
91d96372 61vmanipulator m2 -attach b2 -adjustPosition 1 -adjustSize 0 -enableModes 1 -zoomable 0 -size 40
625e1958 62
63set mouse_pick_1 {341 283}
64set mouse_pick_2 {277 246}
65set mouse_pick_3 {277 246}
66set mouse_drag_3 {210 210}
67
68# pick at default zoom
69vmoveto 0 0
70vmoveto {*}$mouse_pick_1
71vdump $anImage4
72
73# pick at changed zoom
74vzoom 0.5
75vmoveto 0 0
76vmoveto {*}$mouse_pick_2
77vdump $anImage5
78
79# drag object
80vselect {*}$mouse_pick_3
81vmanipulator m2 -startTransform {*}$mouse_pick_3
82vmanipulator m2 -transform {*}$mouse_drag_3
83vmanipulator m2 -stopTransform
84vselect 0 0
85vdump $anImage6
86
87set to_dump_screen 0