Class LinearDimension
Represents a linear or rotated dimension EntityObject.
Inherited Members
Namespace: netDxf.Entities
Assembly: CADability.dll
Syntax
public class LinearDimension : Dimension, IHasXData, ICloneable
Constructors
| Improve this Doc View SourceLinearDimension()
Initializes a new instance of the LinearDimension class.
Declaration
public LinearDimension()
LinearDimension(Line, Double, Double)
Initializes a new instance of the LinearDimension class.
Declaration
public LinearDimension(Line referenceLine, double offset, double rotation)
Parameters
| Type | Name | Description |
|---|---|---|
| Line | referenceLine | Reference Line of the dimension. |
| System.Double | offset | Distance between the reference line and the dimension line. |
| System.Double | rotation | Rotation in degrees of the dimension line. |
Remarks
The reference points define the distance to be measure.
LinearDimension(Line, Double, Double, DimensionStyle)
Initializes a new instance of the LinearDimension class.
Declaration
public LinearDimension(Line referenceLine, double offset, double rotation, 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. |
| System.Double | rotation | Rotation in degrees of the dimension line. |
| DimensionStyle | style | The DimensionStyle to use with the dimension. |
Remarks
The reference points define the distance to be measure.
LinearDimension(Line, Double, Double, Vector3)
Initializes a new instance of the LinearDimension class.
Declaration
public LinearDimension(Line referenceLine, double offset, double rotation, 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. |
| System.Double | rotation | Rotation in degrees of 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.
LinearDimension(Line, Double, Double, Vector3, DimensionStyle)
Initializes a new instance of the LinearDimension class.
Declaration
public LinearDimension(Line referenceLine, double offset, double rotation, 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. |
| System.Double | rotation | Rotation in degrees of 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.
LinearDimension(Vector2, Vector2, Double, Double)
Initializes a new instance of the LinearDimension class.
Declaration
public LinearDimension(Vector2 firstPoint, Vector2 secondPoint, double offset, double rotation)
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 mid point reference line and the dimension line. |
| System.Double | rotation | Rotation in degrees of the dimension line. |
Remarks
The reference points define the distance to be measure.
LinearDimension(Vector2, Vector2, Double, Double, DimensionStyle)
Initializes a new instance of the LinearDimension class.
Declaration
public LinearDimension(Vector2 firstPoint, Vector2 secondPoint, double offset, double rotation, 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 mid point reference line and the dimension line. |
| System.Double | rotation | Rotation in degrees of 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
Gets the 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 mid point of 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 its rotation.
Rotation
Gets or sets the rotation of the dimension line.
Declaration
public double Rotation { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Double |
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 LinearDimension that is a copy of the current instance.
Declaration
public override object Clone()
Returns
| Type | Description |
|---|---|
| System.Object | A new LinearDimension 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. |