elementSet.points

The set naming points (positions) by index.

Value helperSince 0.3.0

Usage

TypeScript
ElementSet.points(indices: readonly number[], at?: Scope): ElementSet

Parameters

  • indicesreadonly number[]

    Point indices in the geometry the scope names; valid only in that revision.

    Required

  • atScope

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

Returns

{...at, kind: 'point', indices }, the array kept as given (not copied, sorted or de-duplicated); an empty array names nothing.

Example

TypeScript
ElementSet.points([0, 4], { revision: 'main@3', node: 'box1' }) // → { revision: 'main@3', node: 'box1', kind: 'point', indices: [0, 4] }

See also