Drawings SDK Developer Guide > Working with .dwg Files > Working with Entities > Working with Specific Entitites > Working with Dimensions > Overview of Dimensions > Overview of Arc Dimensions
Overview of Arc Dimensions

Arc dimensions measure and represent the length of a circular arc as a dimension entity in primary and alternate units. To define the placement, the arc dimension entity requires the center point of the arc to measure, start point from which the arc begins, end point in which the arc finishes, first extension point through which the first extension line passes, second extension point through which the second extension line passes, point on the arc through which the dimension lines pass, text point in which the dimension text box is placed, and the normal which orients the dimension in WCS. The center point, start point, and end point define the definition arc. An arc dimension entity can be rotated, scaled, and oriented in WCS.

Elements of an arc dimension

An arc dimension entity consists of the following elements:

  • Two dimension lines — Arcs that pass through the on-arc point in parallel to the definition arc and direct to the extension lines. Dimension lines can be placed inside or outside extension lines. When dimension lines are placed inside, the first dimension line draws from the middle to the first extension line, and the second dimension line draws from the middle to the second extension line. When dimension lines are placed outside, they are drawn from the outside towards the extension lines and can be either connected by the forced line or can be open-ended. Dimension lines can end at an extended distance beyond the extension lines. Both dimension lines have color independent from the entity color, lineweight independent from the entity lineweight, and linetype independent from the entity linetype. Each dimension line has individual visibility and an individual arrowhead. Each arrowhead can be set either from the fixed list of arrowhead types, or can be defined by a block. The size is set for arrowheads together.
  • Two extension lines — Straight lines from the extension points to the dimension lines, with their extension passing through the arc center point. The first extension line is drawn from the first extension point to the end of the first dimension line. The second extension line is drawn from the second extension point to the end of the second dimension line. Both extension lines can begin at an offset distance from the extension points, and both extension lines can finish at an extended distance beyond the dimension lines. Both extension lines have color and lineweight that are independent of the entity's properties. Each extension line has its own visibility setting and individual linetype independent from the entity linetype. Each extension line can have its own individual length or a fixed length can be set for both extension lines.
  • Dimension text box — A linear structure that consists of the required primary measured value, optional alternate measured value, optional primary and alternate tolerance value, optional primary and alternate prefix, and optional primary and alternate suffix. The dimension text box can be centered between or placed above dimension lines, can be aligned horizontally or along dimension or extension lines, can be offset on the gap from the dimension, extension, or leader line, can be rotated, or can be scaled.
  • Optional leader line — When the dimension text box is placed beyond the dimension or extension lines, the arc dimension entity can draw a leader line from the dimension line to the dimension text box margin. The leader line shows the link between the dimension line and the dimension text box. The arc dimension entity can optionally draw the arc-leader line from the dimension lines to the definition arc in the direction from the dimension text box to the arc center. The arc-leader line has an arrowhead on the end. If the angle between the extension lines is less than PI/2, the arc-leader line is not drawn.

The common structure of the arc dimension entity is defined by the text movement, text fit, and the text position relative to the dimension and extension lines (inside or outside).

Text movement

Dimension text can be moved, but the result can vary depending on the Dimtmove value. Dimtmove can be set to the following values:

  • 0 — When set to 0, the dimension text box is always placed either between or beside the dimension or extension lines. If the dimension text box moves, the dimension lines also move, and vice versa, if the dimension lines move along the extension line, the dimension text box also moves. If the dimension text box moves outside of the extension lines, the dimension lines are drawn together and the leader line is drawn from the end of a dimension line to the dimension text box margin. Extension lines are stationary.

    If there is not enough space between extension lines to place text and arrowheads, the text box, the arrowheads, or both the text box and arrowheads are placed automatically outside of the extension lines according to the current fit.

    When the dimension text box is placed inside and the arrowheads are placed outside, the dimension lines are drawn without extension lines.

    When the dimension text box is placed outside and the arrowheads are placed inside, the dimension lines are drawn together inside and the leader line is drawn outside, connecting the dimension line to the dimension text box.

    When the dimension text box and the arrowheads are placed outside, the dimension lines are drawn from the outside to the extension lines, including the leader line, and the forced line that connects the two dimension lines are drawn between the extension lines. The forced line can be omitted. If the dimension text box is placed above a dimension line, the leader line connects along the dimension text box.

  • 1 — When set to 1, the dimension text box can be placed independently from the dimension lines. The leader line is drawn from the middle of dimension lines to the dimension text box margin. The placement of dimension lines and arrowheads is defined by the available space between extension lines, as described above. The arc-leader line is always drawn from the dimension lines to the definition arc in the direction from the text position to the arc center.

  • 2 — When set to 2, the dimension text box can be placed anywhere, independent of dimension line placement and movement. The leader line is not drawn.

For working with arc dimension objects, use the OdDbArcDimension class, which represents an arc dimension entity and manipulates its properties. The OdDbArcDimensionPtr class is the typified smart pointer to an instance of this entity and is used for storing and passing a reference to the arc dimension object.

To create and initialize a new instance of an arc dimension entity, see Overview of Specific Entities.

The main methods of the OdDbArcDimension class are listed below:

  • xLine1Point() — Returns the start point of the first extension line as an object of the OdGePoint3d class.
  • setXLine1Point() — Sets a new start point of the first extension line; requires an object of the OdGePoint3d class as a new point.
  • xLine2Point() — Returns the start point of the second extension line as an object of the OdGePoint3d class.
  • setXLine2Point() — Sets a new start point of the second extension line; requires an object of the OdGePoint3d class as a new point.
  • centerPoint() — Returns the vertex of the angle being dimensioned as an object of the OdGePoint3d class.
  • setCenterPoint() — Sets a new vertex of the angle being dimensioned; requires an object of the OdGePoint3d class as a new point.
  • arcPoint() — Returns the point defining the location of the dimension arc as an object of the OdGePoint3d class.
  • setArcPoint() — Sets a new point defining the location of the dimension arc; requires an object of the OdGePoint3d class as a new point.
  • hasLeader() —Returns true if this dimension entity has a leader drawn to resolve ambiguity.
  • setHasLeader() — Sets or unsets the extra-leader of this dimension entity; requires one bool value.
  • leader1Point() — Returns the start point of the extra leader as an object of the OdGePoint3d class.
  • setLeader1Point() — Sets a new start point of the extra leader; requires an object of the OdGePoint3d class as a new point.
  • leader2Point() — Returns the end point of the extra leader as an object of the OdGePoint3d class.
  • setLeader2Point() — Sets a new end point of the extra leader; requires an object of the OdGePoint3d class as a new point.
  • arcSymbolType() — Returns the type of arc symbol used within the dimension text as an OdInt16 value.
  • setArcSymbolType() — Sets a new type of arc symbol used within the dimension text; requires one OdInt16 value to specify the new type of arc symbol (0 — Arc symbol precedes text; 1 — Arc symbol is above text; 2 — No arc symbol).

The next example demonstrates how to work with an arc dimension entity.


// Create an arc to be dimensioned
OdDbArcPtr pArc = OdDbArc::createObject();
pArc->setDatabaseDefaults(pDb);
bBTR->appendOdDbEntity(pArc);
// Set Arc properties
OdGePoint3d center(7, 0, 0);
pArc->setCenter(center);
pArc->setStartAngle(OdaToRadian(0.0));
pArc->setEndAngle(OdaToRadian(100.0));
pArc->setRadius(2.0);

// Create an Arc Dimension
OdDbArcDimensionPtr pDimension = OdDbArcDimension::createObject();

// Set default setting to the dimension
pDimension->setDatabaseDefaults(pDb);
bBTR->appendOdDbEntity(pDimension);
pDimension->setDatabaseDefaults(pDb);

// Set center
pDimension->setCenterPoint(pArc->center());
// Set arc point
pDimension->setArcPoint(pArc->center() + OdGeVector3d(pArc->radius() + 2.0, 0.0, 0.0));
// Set start point
OdGePoint3d startPoint;
pArc->getStartPoint(startPoint);
pDimension->setXLine1Point(startPoint);
// Set end point
OdGePoint3d endPoint;
pArc->getEndPoint(endPoint);
pDimension->setXLine2Point(endPoint);
// Set Arc symbol before the dimension text
pDimension->setArcSymbolType(0);
// Add arc-leader
pDimension->setHasLeader(true);

See Also

Working with Dimensions

Overview of Dimensions

Overview of Linear Dimensions

Overview of Angular Dimensions

Overview of Diametric Dimensions

Overview of Ordinate Dimensions

Overview of Radial Dimensions

Overview of Radial Large Dimensions

Copyright © 2002 – 2020. Open Design Alliance. All rights reserved.