Hide menu
Loading...
Searching...
No Matches
HatchDefinitionLine

Represents a line definition used in creating a hatch pattern.

This class defines parameters such as angle, base point, offset, and dashes for the definition lines in hatch patterns. It follows the scheme used by AutoCAD.

Extends

Constructors

Constructor

new HatchDefinitionLine(): HatchDefinitionLine

Returns

HatchDefinitionLine

Inherited from

BaseObject.constructor

Properties

angle

angle: number = 0

Angle of the hatch definition line.


dashes

readonly dashes: number[] = []

Dash and gap values of the hatch definition line.

Accessors

basePoint

Get Signature

get basePoint(): Point2d

Base point of the hatch definition line.

Returns

Point2d

Set Signature

set basePoint(basePoint): void

Sets the base point of the hatch definition line.

The coordinates are copied from the provided point.

Parameters

basePoint

Point2d

Base point.

Returns

void


id

Get Signature

get id(): bigint

Returns the unique identifier of the object.

Returns

bigint

Inherited from

BaseObject.id


numberOfDashes

Get Signature

get numberOfDashes(): number

Returns the number of dashes.

Deprecated

Use HatchDefinitionLine.dashes and dashes.length instead.

Returns

number


offset

Get Signature

get offset(): Vector2d

Offset of the hatch definition line.

Returns

Vector2d

Set Signature

set offset(offset): void

Sets the offset of the hatch definition line.

The components are copied from the provided vector.

Parameters

offset

Vector2d

Offset vector.

Returns

void

Methods

addDash()

addDash(dash): void

Adds the dash.

Positive values define dash lengths, while negative values define gaps. The order is determined by the sequence of additions.

Parameters

dash

number

Dash or gap value to add.

Returns

void

Deprecated

Use HatchDefinitionLine.dashes and dashes.push(dash) instead.


dash()

dash(index): number

Returns the dash.

Throws a RangeError if index is not in the range [0, numberOfDashes - 1].

Parameters

index

number

Dash index.

Returns

number

Deprecated

Use HatchDefinitionLine.dashes and dashes[index] instead.