0024351: Test cases for AIS dimension presentations to check arrow orientation, text...
[occt.git] / tests / bugs / vis / bug24351_4
CommitLineData
1d7ca641 1puts "============"
2puts "CR24351"
3puts "============"
4puts ""
5#######################################################################
6# Test AIS angle dimensions: label position and arrow orientation
7#######################################################################
8pload VISUALIZATION
9
10vinit
11vright
12
13set hpos "left hcenter right"
14set vpos "above vcenter below"
15
16# ---------------------------------------------------------------------
17# create dimensions with different arrow orientation and fit algorithm
18# ---------------------------------------------------------------------
19
20vpoint angle1_p1 0 0 40
21vpoint angle1_p2 0 0 0
22vpoint angle1_p3 40 0 0
23vdimension angle name=ang1 text=3d plane=zox label=hfit flyout=40.0 arrows=internal angle1_p1 angle1_p2 angle1_p3
24
25vpoint angle2_p1 80 0 40
26vpoint angle2_p2 80 0 0
27vpoint angle2_p3 120 0 0
28vdimension angle name=ang2 text=3d plane=zox label=hfit flyout=40.0 arrows=external angle2_p1 angle2_p2 angle2_p3
29
30vpoint angle3_p1 0 0 115
31vpoint angle3_p2 0 0 80
32vpoint angle3_p3 35 0 80
33vdimension angle name=ang3 text=3d plane=zox label=hfit flyout=35.0 arrows=fit angle3_p1 angle3_p2 angle3_p3
34
35vpoint angle4_p1 80 0 100
36vpoint angle4_p2 80 0 80
37vpoint angle4_p3 100 0 80
38vdimension angle name=ang4 text=3d plane=zox label=hfit flyout=20.0 arrows=fit angle4_p1 angle4_p2 angle4_p3
39
40vdisplay ang1 ang2 ang3 ang4
41vfit
42
43# ------------------------------------------------
44# create dimension with different label positions
45# ------------------------------------------------
46
47vinit Viewer2/View2
48vright
49
50set idx 0
51for {set r 0} {$r < 3} {incr r} {
52 for {set c 0} {$c < 3} {incr c} {
53
54 set point1 p_[expr "$idx * 3 + 0"]
55 set point2 p_[expr "$idx * 3 + 1"]
56 set point3 p_[expr "$idx * 3 + 2"]
57
58 vpoint $point1 [expr "60.0 * $c + 0"] 0.0 [expr "60.0 * $r + 40"]
59 vpoint $point2 [expr "60.0 * $c + 0"] 0.0 [expr "60.0 * $r + 0"]
60 vpoint $point3 [expr "60.0 * $c + 40"] 0.0 [expr "60.0 * $r + 0"]
61
62 set dimension r_$idx
63
64 vdimension angle name=$dimension text=3d plane=zox label=[lindex $hpos $c],[lindex $vpos $r] arrows=external flyout=40.0 $point1 $point2 $point3
65 vdisplay $dimension
66
67 incr idx
68 }
69}
70vfit
71
72set only_screen 1