Close

Relief for ODA Team in Ukraine

Learn more
ODA Drawings SDK
Overview of Diametric Dimensions

Diametric dimensions measure and represent the diameter of a circle, circular arc, or polyline arc segment as a dimension entity in primary and alternate units. To define the placement, the diametric dimension entity requires the chord point on the circle or arc to which the dimension lines are drawn, an opposite chord point that defines the circle or arc to be measured, a text point that defines the location of the dimension text box, and the normal which orients a dimension in WCS. The circle or arc to be measured is the definition circle or definition arc.

A diametric dimension entity can be rotated, scaled, and oriented in WCS. Additionally, the center of a diametric dimension entity can be marked.

Elements of the diametric dimension

A diametric dimension entity consists of the following elements:

  • Two dimension lines — Straight lines that pass through the chord point, far chord point, or center point, and can be placed inside or outside of the definition circle or arc. When dimension lines are placed inside, they are drawn directly from the center to the chord points. When dimension lines are placed outside, they are drawn from the outside to the chord points, and can be connected with a forced line or can be open-ended. The first dimension line is drawn to the chord point and can have a leader line in the beginning that connects the dimension line to the dimension text box (when it is not aligned). The second dimension line is drawn to the far chord point or can be absent. Both dimension lines have color, lineweight, and linetype independent of the entity's properties. Each dimension line has its own visibility setting and arrowhead. Each arrowhead can be set from the fixed list of arrowhead types or can be defined by a block. Both arrowheads are the same size.
  • Dimension text box — A linear structure that contains the required primary text box, 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 relative to the dimension line or placed above the dimension line, aligned horizontally or along the dimension line, offset from the dimension line or leader line, rotated, or scaled.
  • Optional leader line — If the dimension text box is not placed along the dimension line, the leader line is drawn from the beginning of the dimension line to the dimension text box margin. If the dimension text box is placed along the dimension line, the leader line is not drawn.

The common structure of a diametric dimension entity is defined by the text movement and text position relative to the definition circle or arc (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 — If set to 0, dimension lines and the dimension text box move together, and the center of the dimension text box defines the text point.
  • 1 — If set to 1, dimension lines and the dimension text box move independently and are connected with a leader, and the beginning of the first dimension line defines the text point.

    In both cases (0 and 1), the dimension text box is placed next to the dimension line. If the dimension text box moves, the dimension lines rotate around the center point towards the text point, and vice versa, if the dimension lines rotate along the circle or arc, the dimension text box also moves with it. When the dimension text box moves from inside to outside (or outside to inside) of a circle or arc, the dimension lines are redrawn automatically from the text point to the chord points.

    When the dimension text box is placed inside of the definition circle or arc, the first and second dimension lines are drawn together from the center to the first chord point (they overlap in the same location).

    When the dimension text box is placed outside of the definition circle or arc, the first dimension line is drawn from the text point to the chord point, and the second dimension line is drawn from the far chord point to the center point.

    Dimension lines can be connected by the forced line or can be open-ended. If the forced line is absent, the center can be marked. If the center is marked, dimension lines are drawn outside together. When dimension lines are placed inside, the forced line and center mark are not drawn.
  • 2 — If set to 2, the dimension lines and dimension text box move independently without a leader. The center of the dimension text box defines the text point, and the diametric dimension entity has two opposite dimension lines. The first dimension line is drawn from the center up to the first chord point, and the second dimension line is drawn from the center up to the second chord point. Both dimension lines are placed inside, regardless of the dimension text box position.

    If the dimension text box is placed inside of a circle or arc, it breaks the dimension lines, and the dimension text box is offset by a gap on both sides. If the dimension text box is placed outside of a circle or arc, the dimension lines are not broken and are drawn inside, and the forced line and center type are not drawn.

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

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

The main methods of the OdDbDiametricDimension class are listed below:

  • chordPoint() — Returns the chord point as an object of the OdGePoint3d class.
  • setChordPoint() — Sets a new chord point; requires an object of the OdGePoint3d class as a new point.
  • farChordPoint() — Returns the far chord point as an object of the OdGePoint3d class.
  • setFarChordPoint() — Sets a new far chord point; requires an object of the OdGePoint3d class as a new point.
  • leaderLength() — Returns the length from the chordPoint to the dogleg as a double value.
  • setLeaderLength() — Sets a new length from the chordPoint to the dogleg; requires one double value.

The next example demonstrates how to work with a diametric dimension entity.


// Create a circle to be dimensioned  
OdDbCirclePtr pCircle = OdDbCircle::createObject();
pCircle->setDatabaseDefaults(bBTR->database());
bBTR->appendOdDbEntity(pCircle);
// Set Circle properties
OdGePoint3d center (12, 0, 0);
pCircle->setCenter(center);
pCircle->setRadius(1.0);
  
// Create a Diametric Dimension 
OdDbDiametricDimensionPtr pDimension = OdDbDiametricDimension::createObject();
pDimension->setDatabaseDefaults(bBTR->database());
bBTR->appendOdDbEntity(pDimension);
// Create a vector to determine the diamter of the circle
OdGeVector3d chordVector(pCircle->radius(), 0.0, 0.0);
chordVector.rotateBy(OdaToRadian(60.0), OdGeVector3d::kZAxis);
// Set first and second chord points
pDimension->setChordPoint(pCircle->center() + chordVector);
pDimension->setFarChordPoint(pCircle->center() - chordVector);
// Set leader length
pDimension->setLeaderLength(0.5);
pDimension->useDefaultTextPosition();

See Also

Working with Dimensions

Overview of Dimensions

Overview of Linear Dimensions

Overview of Angular Dimensions

Overview of Arc-Length Dimensions

Overview of Ordinate Dimensions

Overview of Radial Dimensions

Overview of Radial Large Dimensions

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