Class AlignedDimension
Represents a dimension EntityObject that is aligned the reference line.
Inherited Members
Namespace: netDxf.Entities
Assembly: CADability.dll
Syntax
public class AlignedDimension : Dimension, IHasXData, ICloneable
Constructors
| Improve this Doc View SourceAlignedDimension()
Initializes a new instance of the AlignedDimension class.
Declaration
public AlignedDimension()
AlignedDimension(Line, Double)
Initializes a new instance of the AlignedDimension class.
Declaration
public AlignedDimension(Line referenceLine, double offset)
Parameters
| Type | Name | Description |
|---|---|---|
| Line | referenceLine | Reference Line of the dimension. |
| System.Double | offset | Distance between the reference line and the dimension line. |
Remarks
The reference points define the distance to be measure.
AlignedDimension(Line, Double, DimensionStyle)
Initializes a new instance of the AlignedDimension class.
Declaration
public AlignedDimension(Line referenceLine, double offset, DimensionStyle style)
Parameters
| Type | Name | Description |
|---|---|---|
| Line | referenceLine | Reference Line of the dimension. |
| System.Double | offset | Distance between the reference line and the dimension line. |
| DimensionStyle | style | The DimensionStyle to use with the dimension. |
Remarks
The reference points define the distance to be measure.
AlignedDimension(Line, Double, Vector3)
Initializes a new instance of the AlignedDimension class.
Declaration
public AlignedDimension(Line referenceLine, double offset, Vector3 normal)
Parameters
| Type | Name | Description |
|---|---|---|
| Line | referenceLine | Reference Line of the dimension. |
| System.Double | offset | Distance between the reference line and the dimension line. |
| Vector3 | normal | Normal vector of the plane where the dimension is defined. |
Remarks
The reference points define the distance to be measure.
AlignedDimension(Line, Double, Vector3, DimensionStyle)
Initializes a new instance of the AlignedDimension class.
Declaration
public AlignedDimension(Line referenceLine, double offset, Vector3 normal, DimensionStyle style)
Parameters
| Type | Name | Description |
|---|---|---|
| Line | referenceLine | Reference Line of the dimension. |
| System.Double | offset | Distance between the reference line and the dimension line. |
| Vector3 | normal | Normal vector of the plane where the dimension is defined. |
| DimensionStyle | style | The DimensionStyle to use with the dimension. |
Remarks
The reference line define the distance to be measure.
AlignedDimension(Vector2, Vector2, Double)
Initializes a new instance of the AlignedDimension class.
Declaration
public AlignedDimension(Vector2 firstPoint, Vector2 secondPoint, double offset)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector2 | firstPoint | First reference Vector2 of the dimension. |
| Vector2 | secondPoint | Second reference Vector2 of the dimension. |
| System.Double | offset | Distance between the reference line and the dimension line. |
Remarks
The reference points define the distance to be measure.
AlignedDimension(Vector2, Vector2, Double, DimensionStyle)
Initializes a new instance of the AlignedDimension class.
Declaration
public AlignedDimension(Vector2 firstPoint, Vector2 secondPoint, double offset, DimensionStyle style)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector2 | firstPoint | First reference Vector2 of the dimension. |
| Vector2 | secondPoint | Second reference Vector2 of the dimension. |
| System.Double | offset | Distance between the reference line and the dimension line. |
| DimensionStyle | style | The DimensionStyle to use with the dimension. |
Remarks
The reference points define the distance to be measure.
Properties
| Improve this Doc View SourceDimLinePosition
Gets the location of the dimension line.
Declaration
public Vector2 DimLinePosition { get; }
Property Value
| Type | Description |
|---|---|
| Vector2 |
FirstReferencePoint
Gets or sets the first definition point of the dimension in OCS (object coordinate system).
Declaration
public Vector2 FirstReferencePoint { get; set; }
Property Value
| Type | Description |
|---|---|
| Vector2 |
Measurement
Actual measurement.
Declaration
public override double Measurement { get; }
Property Value
| Type | Description |
|---|---|
| System.Double |
Overrides
Remarks
The dimension is always measured in the plane defined by the normal.
Offset
Gets or sets the distance between the reference line and the dimension line.
Declaration
public double Offset { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Double |
Remarks
The offset value must be equal or greater than zero.
The side at which the dimension line is drawn depends of the direction of its reference line.
SecondReferencePoint
Gets or sets the second definition point of the dimension in OCS (object coordinate system).
Declaration
public Vector2 SecondReferencePoint { get; set; }
Property Value
| Type | Description |
|---|---|
| Vector2 |
Methods
| Improve this Doc View SourceBuildBlock(String)
Gets the block that contains the entities that make up the dimension picture.
Declaration
protected override Block BuildBlock(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | Name to be assigned to the generated block. |
Returns
| Type | Description |
|---|---|
| Block | The block that represents the actual dimension. |
Overrides
| Improve this Doc View SourceCalculateReferencePoints()
Calculate the dimension reference points.
Declaration
protected override void CalculateReferencePoints()
Overrides
| Improve this Doc View SourceClone()
Creates a new AlignedDimension that is a copy of the current instance.
Declaration
public override object Clone()
Returns
| Type | Description |
|---|---|
| System.Object | A new AlignedDimension that is a copy of this instance. |
Overrides
| Improve this Doc View SourceSetDimensionLinePosition(Vector2)
Calculates the dimension offset from a point along the dimension line.
Declaration
public void SetDimensionLinePosition(Vector2 point)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector2 | point | Point along the dimension line. |
TransformBy(Matrix3, Vector3)
Moves, scales, and/or rotates the current entity given a 3x3 transformation matrix and a translation vector.
Declaration
public override void TransformBy(Matrix3 transformation, Vector3 translation)
Parameters
| Type | Name | Description |
|---|---|---|
| Matrix3 | transformation | Transformation matrix. |
| Vector3 | translation | Translation vector. |
Overrides
Remarks
Matrix3 adopts the convention of using column vectors to represent a transformation matrix.