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.
A diametric dimension entity consists of the following elements:
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).
Dimension text can be moved, but the result can vary depending on the Dimtmove value. Dimtmove can be set to the following values:
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:
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();
Overview of Angular Dimensions
Overview of Arc-Length Dimensions
Copyright © 2002 – 2022. Open Design Alliance. All rights reserved.
|