1d7ca641 |
1 | puts "============" |
2 | puts "CR24351" |
3 | puts "============" |
4 | puts "" |
5 | ####################################################################### |
6 | # Test AIS Length dimensions: label position and arrow orientation |
7 | ####################################################################### |
8 | pload VISUALIZATION |
9 | |
10 | vinit |
11 | vright |
12 | |
13 | set hpos "left hcenter right" |
14 | set vpos "above vcenter below" |
15 | |
16 | # --------------------------------------------------------------------- |
17 | # create dimensions with different arrow orientation and fit algorithm |
18 | # --------------------------------------------------------------------- |
19 | |
20 | vpoint arrow_p1 0 0 0 |
21 | vpoint arrow_p2 50 0 0 |
22 | |
23 | vpoint arrow_p3 100 0 0 |
24 | vpoint arrow_p4 150 0 0 |
25 | |
fe83e1ea |
26 | vpoint arrow_p5 100 0 50 |
27 | vpoint arrow_p6 127 0 50 |
1d7ca641 |
28 | |
fe83e1ea |
29 | vpoint arrow_p7 0 0 50 |
30 | vpoint arrow_p8 10 0 50 |
1d7ca641 |
31 | |
fe83e1ea |
32 | # test forced internal arrow orientation |
0499eb06 |
33 | vdimension arrow_d1 -length -shapes arrow_p1 arrow_p2 -text 3d -plane zox -label hfit -flyout 10.0 -arrow internal |
fe83e1ea |
34 | |
35 | # test forced external arrow orientation |
0499eb06 |
36 | vdimension arrow_d2 -length -shapes arrow_p3 arrow_p4 -text 3d -plane zox -label hfit -flyout 10.0 -arrow external |
fe83e1ea |
37 | |
38 | # test that auto-fit for arrow places them externally for small geometry |
0499eb06 |
39 | vdimension arrow_d3 -length -shapes arrow_p5 arrow_p6 -text 3d -plane zox -label hcenter -flyout 10.0 -arrow fit |
fe83e1ea |
40 | |
41 | # test that auto-fit for text places the label externally for small geometry |
0499eb06 |
42 | vdimension arrow_d4 -length -shapes arrow_p7 arrow_p8 -text 3d -plane zox -label hfit -flyout 10.0 -arrow fit |
fe83e1ea |
43 | |
1d7ca641 |
44 | vfit |
45 | |
46 | # ------------------------------------------------ |
47 | # create dimension with different label positions |
48 | # ------------------------------------------------ |
49 | |
50 | vinit Viewer2/View2 |
51 | vright |
52 | |
53 | set idx 0 |
54 | for {set r 0} {$r < 3} {incr r} { |
55 | for {set c 0} {$c < 3} {incr c} { |
56 | |
57 | set point1 p_[expr "$idx * 2 + 0"] |
58 | set point2 p_[expr "$idx * 2 + 1"] |
59 | |
60 | vpoint $point1 [expr "50.0 * ($c*2 + 0)"] 0.0 [expr "50.0 * $r"] |
61 | vpoint $point2 [expr "50.0 * ($c*2 + 1)"] 0.0 [expr "50.0 * $r"] |
62 | |
63 | set dimension d_$idx |
64 | |
0499eb06 |
65 | vdimension $dimension -length -shapes $point1 $point2 -text 3d -plane zox -label [lindex $hpos $c] [lindex $vpos $r] -arrow external -flyout 10.0 |
1d7ca641 |
66 | vdisplay $dimension |
67 | |
68 | incr idx |
69 | } |
70 | } |
71 | vfit |
72 | |
73 | set only_screen 1 |