1d7ca641 |
1 | puts "============" |
2 | puts "CR24351" |
3 | puts "============" |
4 | puts "" |
5 | ####################################################################### |
6 | # Test AIS Diameter 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 circle1_p1 0 0 30 |
21 | vpoint circle1_p2 30 0 0 |
22 | vpoint circle1_p3 60 0 30 |
23 | vcircle circle1 circle1_p1 circle1_p2 circle1_p3 0 |
24 | vdimension diameter name=diam1 text=3d plane=zox label=hfit flyout=0 arrows=internal circle1 |
25 | |
26 | vpoint circle2_p1 100 0 30 |
27 | vpoint circle2_p2 130 0 0 |
28 | vpoint circle2_p3 160 0 30 |
29 | vcircle circle2 circle2_p1 circle2_p2 circle2_p3 0 |
30 | vdimension diameter name=diam2 text=3d plane=zox label=hfit flyout=0 arrows=external circle2 |
31 | |
32 | vpoint circle3_p1 0 0 102 |
33 | vpoint circle3_p2 22 0 80 |
34 | vpoint circle3_p3 44 0 102 |
35 | vcircle circle3 circle3_p1 circle3_p2 circle3_p3 0 |
36 | vdimension diameter name=diam3 text=3d plane=zox label=hfit flyout=0 label=hfit arrows=fit circle3 |
37 | |
38 | vpoint circle4_p1 100 0 92 |
39 | vpoint circle4_p2 112 0 80 |
40 | vpoint circle4_p3 124 0 92 |
41 | vcircle circle4 circle4_p1 circle4_p2 circle4_p3 0 |
42 | vdimension diameter name=diam4 text=3d plane=zox label=hfit flyout=0 label=hfit arrows=fit circle4 |
43 | |
44 | vdisplay diam1 diam2 diam3 diam4 |
45 | vfit |
46 | |
47 | # ------------------------------------------------ |
48 | # create dimension with different label positions |
49 | # ------------------------------------------------ |
50 | |
51 | vinit Viewer2/View2 |
52 | vright |
53 | |
54 | set idx 0 |
55 | for {set r 0} {$r < 3} {incr r} { |
56 | for {set c 0} {$c < 3} {incr c} { |
57 | |
58 | set point1 p_[expr "$idx * 3 + 0"] |
59 | set point2 p_[expr "$idx * 3 + 1"] |
60 | set point3 p_[expr "$idx * 3 + 2"] |
61 | set circle c_[expr "$idx"] |
62 | |
63 | vpoint $point1 [expr "80.0 * $c + 0"] 0.0 [expr "60.0 * $r + 22"] |
64 | vpoint $point2 [expr "80.0 * $c + 22"] 0.0 [expr "60.0 * $r + 0"] |
65 | vpoint $point3 [expr "80.0 * $c + 44"] 0.0 [expr "60.0 * $r + 22"] |
66 | vcircle $circle $point1 $point2 $point3 0 |
67 | |
68 | set dimension d_$idx |
69 | |
70 | vdimension diameter name=$dimension text=3d plane=zox label=[lindex $hpos $c],[lindex $vpos $r] arrows=external flyout=0.0 $circle |
71 | vdisplay $dimension |
72 | |
73 | incr idx |
74 | } |
75 | } |
76 | vfit |
77 | |
78 | set only_screen 1 |