Hide menu
Loading...
Searching...
No Matches
LinearDimension

Linear dimensions with horizontal, vertical, and aligned dimension lines.

Horizontal linear dimensions describe the distance between two points along the OX axis. Vertical linear dimensions describe the distance between two points along the OY axis. Aligned linear dimensions describe the distance between two points along the line connecting them.

firstReferencePoint and secondReferencePoint refer to points on the drawing geometry that are being measured. Two parallel extension lines come out of these points. dimensionLinePoint defines the dimension line and can be any point on it.

Extends

Constructors

Constructor

new LinearDimension(firstReferencePoint?, secondReferencePoint?, dimensionLinePoint?, measurementValue?, rotation?): LinearDimension

Creates a linear dimension.

The provided points are copied.

If measurementValue is provided, it is assigned to the dimension.

Parameters

firstReferencePoint?

Point2d = ...

First reference point on the drawing geometry that is being measured.

secondReferencePoint?

Point2d = ...

Second reference point on the drawing geometry that is being measured.

dimensionLinePoint?

Point2d = ...

Point defining the dimension line. It can be any point on that line.

measurementValue?

number

Actual measurement value.

rotation?

RotationType = RotationType.HORIZONTAL

Rotation of the dimension, which determines the type of the linear dimension.

Returns

LinearDimension

Overrides

Dimension.constructor

Properties

arrowheadPlacement

arrowheadPlacement: ArrowheadPlacementType = ArrowheadPlacementType.INTERNAL

Arrowhead placement.

The default value is ArrowheadPlacementType.INTERNAL.

Inherited from

AngularDimension.arrowheadPlacement


firstArrowType

firstArrowType: ArrowType = ArrowType.CLOSED_FILLED

First arrow type.

The default value is ArrowType.CLOSED_FILLED.

Inherited from

AngularDimension.firstArrowType


isTextAlignedHorizontally

isTextAlignedHorizontally: boolean = false

Indicates whether the measurement text is aligned horizontally.

Inherited from

AngularDimension.isTextAlignedHorizontally


measurementValue

measurementValue: number = 0

Actual measurement value.

Inherited from

Dimension.measurementValue


rotation

rotation: RotationType = RotationType.HORIZONTAL

Rotation of the dimension, which determines the type of the linear dimension.


secondArrowType

secondArrowType: ArrowType = ArrowType.CLOSED_FILLED

Second arrow type.

The default value is ArrowType.CLOSED_FILLED.

Inherited from

AngularDimension.secondArrowType


text

text: Text

Dimension text.

Inherited from

AngularDimension.text

Accessors

dimensionLinePoint

Get Signature

get dimensionLinePoint(): Point2d

Point defining the dimension line.

Returns

Point2d

Set Signature

set dimensionLinePoint(point): void

Sets the point defining the dimension line.

The coordinates are copied from the provided point.

Parameters

point

Point2d

Dimension line point.

Returns

void


firstReferencePoint

Get Signature

get firstReferencePoint(): Point2d

First reference point on the drawing geometry that is being measured.

Returns

Point2d

Set Signature

set firstReferencePoint(point): void

Sets the first reference point on the drawing geometry that is being measured.

The coordinates are copied from the provided point.

Parameters

point

Point2d

First reference point.

Returns

void


id

Get Signature

get id(): bigint

Returns the unique identifier of the object.

Returns

bigint

Inherited from

Dimension.id


secondReferencePoint

Get Signature

get secondReferencePoint(): Point2d

Second reference point on the drawing geometry that is being measured.

Returns

Point2d

Set Signature

set secondReferencePoint(point): void

Sets the second reference point on the drawing geometry that is being measured.

The coordinates are copied from the provided point.

Parameters

point

Point2d

Second reference point.

Returns

void


uuid

Get Signature

get uuid(): `${string}-${string}-${string}-${string}-${string}` | null

UUID of the drawing element.

The value is null if no UUID is assigned.

Returns

`${string}-${string}-${string}-${string}-${string}` | null

Set Signature

set uuid(uuid): void

Sets the UUID of the drawing element.

Parameters

uuid

`${string}-${string}-${string}-${string}-${string}` | null

UUID to assign to the drawing element.

Returns

void

Inherited from

Dimension.uuid

Methods

accept()

accept(visitor): void

Accepts an element visitor.

Parameters

visitor

ElementVisitor

Element visitor to accept.

Returns

void

Overrides

Dimension.accept