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