elementSet.edges

The set naming edges as point-index pairs, each stored low index first.

Value helperSince 0.3.0

Usage

TypeScript
ElementSet.edges(pairs: readonly (readonly [number, number])[], at?: Scope): ElementSet

Parameters

  • pairsreadonly (readonly [number, number])[]

    Edges as the two point indices they join, in either order.

    Required

  • atScope

    The revision and graph node whose geometry the indices address; omit both for free-standing geometry. Default {}.

Returns

{...at, kind: 'edge', edges } with each pair reordered low first (a new array); an empty list names nothing.

Example

TypeScript
ElementSet.edges([[3, 1]]).edges // → [[1, 3]]

See also