5 #######################################################################
6 # Test AIS Length dimensions: label position and arrow orientation
7 #######################################################################
13 set hpos "left hcenter right"
14 set vpos "above vcenter below"
16 # ---------------------------------------------------------------------
17 # create dimensions with different arrow orientation and fit algorithm
18 # ---------------------------------------------------------------------
21 vpoint arrow_p2 50 0 0
23 vpoint arrow_p3 100 0 0
24 vpoint arrow_p4 150 0 0
26 vpoint arrow_p5 100 0 50
27 vpoint arrow_p6 127 0 50
29 vpoint arrow_p7 0 0 50
30 vpoint arrow_p8 10 0 50
32 # test forced internal arrow orientation
33 vdimension length name=arrow_d1 text=3d plane=zox label=hfit flyout=10.0 arrows=internal arrow_p1 arrow_p2
35 # test forced external arrow orientation
36 vdimension length name=arrow_d2 text=3d plane=zox label=hfit flyout=10.0 arrows=external arrow_p3 arrow_p4
38 # test that auto-fit for arrow places them externally for small geometry
39 vdimension length name=arrow_d3 text=3d plane=zox label=hcenter flyout=10.0 arrows=fit arrow_p5 arrow_p6
41 # test that auto-fit for text places the label externally for small geometry
42 vdimension length name=arrow_d4 text=3d plane=zox label=hfit flyout=10.0 arrows=fit arrow_p7 arrow_p8
44 vdisplay arrow_d1 arrow_d2 arrow_d3 arrow_d4
47 # ------------------------------------------------
48 # create dimension with different label positions
49 # ------------------------------------------------
55 for {set r 0} {$r < 3} {incr r} {
56 for {set c 0} {$c < 3} {incr c} {
58 set point1 p_[expr "$idx * 2 + 0"]
59 set point2 p_[expr "$idx * 2 + 1"]
61 vpoint $point1 [expr "50.0 * ($c*2 + 0)"] 0.0 [expr "50.0 * $r"]
62 vpoint $point2 [expr "50.0 * ($c*2 + 1)"] 0.0 [expr "50.0 * $r"]
66 vdimension length name=$dimension text=3d plane=zox label=[lindex $hpos $c],[lindex $vpos $r] arrows=external flyout=10.0 $point1 $point2