Table of Contents


Dimensions

This section describes the dimensioning features available for producing annotated drawings. These functions deal primarily with 2D data defined in the XY plane. Their behavior is undefined when applied to 3D objects.

Format Strings

The dimension constructors take an argument for a format string which is used to compose the label for the dimension. The format string is composed as for the printf function in the C programming language where the characters %f are replaced by a number appropriate to the dimension. For example, in a linear dimension between two points 5.7 units apart, the format string might be "%f INCHES", which would appear in the output as 5.700000 INCHES. The default format string is "%f". If the format string does not contain the %f characters, the numerical value of the dimension will not appear in the output.

Refer to a C programming guide for additional formatting options available with the %f format. Do not include other printf formatting characters (e.g., %s); shape_edit may crash. Use only %f, and no more than once.

Label Locations and Padding

A few dimension functions allow you to specify a label location and padding value. The label location places the label between two boundaries, such as between the endpoints of a linear dimension. The location is a real number between 0 and 1 and is treated as a parameter for the length between the boundaries. The default value is 0.5, which places the label halfway between the boundaries. Each function definition below explains what the boundaries are for that particular dimension.

The padding value is the amount of blank space to leave for the label. In a linear dimension, a line is drawn between the two endpoints. The padding value is the amount of space (parametrically speaking) which is left blank to allow for the text.

Arrowheads

The arrowheads in dimensions present a special problem for graphical display in that they are usually intended to be displayed at a constant size regardless of the scale factor of the drawing. Arrowhead size is specified as a string, one of "tiny", "small", "medium", or "large." The default is "medium". The actual size of the arrowhead in the output (i.e., on the screen or printed) is determined by the individual display device driver. These are relative sizes. 

Linear Dimensions

Linear dimensions document the linear distance between two points. Although the default is to dimension the distance parallel to the direction between two points, an arbitrary direction can be specified. The dimension is displayed as two line segments drawn near the points in a direction perpendicular to the dimension direction. A doubleheaded arrow is drawn parallel to the dimension direction with the heads contacting the line segments. If this distance is small, the arrows can be drawn outside the line segments. The distance between the two points in the dimension direction is displayed somewhere between the line segments. The exact position is controlled by the user. If the arrows are drawn outside, the annotation is displayed near the tail of one arrow.
linDim( Pt1, Pt2, OffsetVec, ArrowheadSize, FmtString, LabelLoc, LabelPad, ArrowsOutside, ArrowLength )
Returns
<linDim> Constructs a linear dimension type.
Pt1, Pt2
<point> Endpoints of the distance to document.
OffsetVec
<vector | false> The direction in which to project the distance to measure. The default is 90 degrees counterclockwise from the direction from Pt1 to Pt2.
ArrowheadSize
<string | false> Size of the arrowheads, as described above.
FmtString
<string | false> A string as described above giving the format of the label. The default is "%f".
LabelLoc
<number | false> A number between 0 and 1 describing where the label should be placed along the distance between Pt1 and Pt2. The default is 0.5. If ArrowsOutside is true, this argument is ignored.
LabelPad
<number | false> A number between 0 and 1 describing what portion of the line drawn along the dimension direction should be left blank for the label. The default is 0. if ArrowsOutside is true, this argument is ignored.
ArrowsOutside
<boolean> (optional) If true, the arrows are drawn outside of the line segments indicating the end points. The default is false. If true, LabelLoc and LabelPad are ignored, and should be false.
ArrowLength
<number> (optional) The length of the arrows in modeling coordinates when ArrowsOutside is true. If not specified, it defaults to twice the distance between endpoints.

Radius and Diameter Dimensions

These dimensions describe the radius of circles or circular arcs. An arrow is displayed with its tail at the arc's center and its head at a given point on the arc. The numerical value corresponding to the radius is displayed in a user-defined format somewhere along the arrow. The user controls the placement of the radius label. The diameter can be documented instead of the radius. The arrow can also appear outside the arc, in which case it is composed of a bent arrow whose head lies on the given point and which points to the center of the arc, and a horizontal line segment connected to the arrow's tail. The annotation appears on the other endpoint of the horizontal segment. The user controls the length of the arrow and segment in this event.
diaDim( CenterPt, ArcPt, ArrowheadSize, FmtString, LabelLoc, LabelPad, DiamFlag, ArrowsOutside, BentLen, HorizLen )
Returns
<diaDim> Constructs a diameter/radius dimension type.
CenterPt
<point> Center point of circle or circular arc.
ArcPt
<point> Point on circle or arc where arrow will point.
ArrowheadSize
< string | false> Arrowhead size, as described above.
FmtString
<string | false> A string as described above giving the format of the label. The default is "%f".
LabelLoc
<number | false> A number between 0 and 1 describing where the label should be placed along the distance between Pt1 and Pt2. The default is 0.5. If ArrowsOutside is true, this argument is ignored.
LabelPad
<number | false> A number between 0 and 1 describing what portion of the line drawn along the dimension direction should be left blank for the label. The default is 0. if ArrowsOutside is true, this argument is ignored.
DiamFlag
<boolean> If true, the diameter of the arc or circle will be described instead of the radius.
ArrowsOutside
<boolean> (optional) If true, the arrows are drawn outside of the line segments indicating the end points. The default is false. If true, LabelLoc and LabelPad are ignored, and should be false.
BentLength
<number> (optional) The length in model coordinates of the bent portion of the arrow if ArrowsOutside is true. The default is 0.5.
HorizLength
<number> (optional) The length in model coordinates of the horizontal portion of the arrow if ArrowsOutside is true. The default is 0.5.

Angular dimensions

This dimension describes an angle. Line segments are drawn in the given directions from the given center point. A doubleheaded arc arrow is drawn inside the segments. A numerical annotation in user-defined format appears somwhere along the arc. The user controls the exact placement of the annotation. If the arc is small, annotation arcs can be drawn outside the given angle, in which case the annotation appears near the tail of one of the arc arrows.
angDim( CenterPt, Dir1, Dir2, ArrowheadSize, FmtString, LabelLoc, LabelPad, Radius, ArrowsOutside, ArrowAngle )
Returns
<angDim> Constructs an angle dimension type.
CenterPt
<point> Vertex point of angle to be measured.
Dir1, Dir2
<vector> Vectors describing the angle to be measured.
ArrowheadSize
<string | false> Arrowhead size, as described above.
FmtString
<string | false> A string as described above giving the format of the label. The default is "%f".
LabelLoc
<number | false> A number between 0 and 1 describing where the label should be placed along the distance between Pt1 and Pt2. The default is 0.5. If ArrowsOutside is true, this argument is ignored.
LabelPad
<number | false> A number between 0 and 1 describing what portion of the line drawn along the dimension direction should be left blank for the label. The default is 0. if ArrowsOutside is true, this argument is ignored.
Radius
<number | false> The distance in model coordinates from CenterPt where the arrows are to be drawn.
ArrowsOutside
<boolean> (optional) If true, the arrows are drawn outside of the line segments indicating the end points. The default is false. If true, LabelLoc and LabelPad are ignored, and should be false.
ArrowAngle
<number> (optional) The portion of a circle that will be used to draw outside annotation arcs when ArrowsOutside is true. The default is an arc equivalent to the angle being measured.

Point Labels

This package also provides for the simple labeling of points. The label is as for the outside case of a diameter dimension. An angled arrow is drawn with its head at the given point. The user controls the angle of the arrow. A horizontal line segment is drawn from the tail of the arrow to the label text. The user controls the length of the horizontal segment.
pointLabel( Pt, ArrowheadSize, LabelString, BentAngle, BentLength, HorizLength )
Returns
<pointLabel> Constructs a point label type.
Pt
<point> The point to label.
ArrowheadSize
<string | false> Arrowhead size, as described above.
LabelString
<string> The label text.
BentAngle
<vector | false> The direction for the bent portion of the arrow. Note: The arrow will point in the direction opposite that of the given vector. The default is 45 degrees from the X axis.
BentLength
<number | false> The length in model coordinates of the bent portion of the arrow. The default is 0.5;
HorizLength
<number | false> The length in model coordinates of the horizontal portion of the arrow. The default is 0.5.

C_Shape_Edit User's Manual 
Alpha_1 User's Manual.
Copyright © 1998, University of Utah
a1-web@gr.cs.utah.edu