0027536: Visualization - incorrect behavior of zoom persisted objects
[occt.git] / tests / v3d / manipulator / scale
1 puts "================================="
2 puts "AIS_Manipulator - scale an object"
3 puts "================================="
4
5 set anImage1 $imagedir/${casename}_1.png
6 set anImage2 $imagedir/${casename}_2.png
7
8 # -------------------------------------
9 # create manipulated and helper objects
10 # -------------------------------------
11
12 pcylinder c1_1  5 10
13 pcylinder c1_2  3 10
14 pcylinder c2 10 20
15 ttranslate c1_1 100 0 20
16 ttranslate c1_2 100 0 20
17 trotate c1_2 100 0 25 0 1 0 90
18 trotate c1_2 100 0 25 0 0 1 10
19 ttranslate c2 100 0 0
20
21 compound c1_1 c1_2 c1
22
23 # ------------------------------------
24 # display manipulated objects (test 1)
25 # ------------------------------------
26
27 vdisplay c1
28 vdisplay c2
29 vsetdispmode 1
30 vaxo
31 vfit
32
33 # ------------------
34 # attach manipulator
35 # ------------------
36
37 vmanipulator m -attach c1 -adjustPosition 1 -adjustSize 0 -enableModes 1 -size 40
38
39 # --------------------------
40 # test hilight and detection
41 # --------------------------
42
43 set mouse_pick {229 137}
44
45 vmoveto {*}$mouse_pick
46 vdump $anImage1
47
48 # -------------------------
49 # test scaling of an object
50 # -------------------------
51
52 set mouse_pick {229 137}
53 set mouse_drag {210 127}
54
55 vmoveto {*}$mouse_pick
56 vselect {*}$mouse_pick
57 vmanipulator m -startTransform {*}$mouse_pick
58 vmanipulator m -transform {*}$mouse_drag
59 vmanipulator m -stopTransform
60 vselect 0 0
61 vdump $anImage2
62
63 set to_dump_screen 0