0025235: Draw Harness - improve commands vdimension and vdimparam
[occt.git] / tests / bugs / vis / bug24412_2
CommitLineData
af203d54 1puts "============"
2puts "CR24412"
3puts "============"
4puts ""
5#######################################################################
6# TKV3d, Dimensions - Possibility to customize text position was lost
7# Test position setting for angular dimension
8#######################################################################
9pload ALL
10
11set anImage1 $imagedir/${casename}_1.png
12set anImage2 $imagedir/${casename}_2.png
13
14vinit Viewer1/View1
15vpoint ang_p1 0 0 30
16vpoint ang_p2 30 0 0
17vpoint ang_p3 60 0 30
0499eb06 18vdimension ang -angle -shapes ang_p1 ang_p2 ang_p3
af203d54 19vmovedim ang 5 0 5
20vfit
21
22# Check that text position was changed and the text is not aligned
23set x_coord 60
24set y_coord 189
25checkcolor $x_coord $y_coord 0.46 0.9 0
26if { $stat != 1 } {
27 puts "Error : Text position of dimension is incorrect."
28}
29
30vdump $anImage1
31
32
33# Update dimension parameters and set automatic text positioning
0499eb06 34vdimparam ang -flyout -5
af203d54 35vfit
36
37# Check that text position was changed according to flyout
38set x_coord 206
39set y_coord 312
40checkcolor $x_coord $y_coord 0.46 0.9 0
41if { $stat != 1 } {
42 puts "Error : Text position of dimension after layout changing is incorrect."
43}
44
45vdump $anImage2