Skip to content
Shapemetry

@huukhanhnguyen/geometry / namespaces/Wire

namespaces/Wire

counts

const counts: (json) => Uint32Array = wasm.wire_counts

[edges, vertices] — the edge count and the number of DISTINCT vertices they reach.

Parameters

json

string

Returns

Uint32Array


edgeValue

const edgeValue: (json, edge_index, t) => Float64Array = wasm.wire_edge_value

curve.value(t) of one edge, in the wire's own edge order.

Parameters

json

string

edge_index

number

t

number

Returns

Float64Array


isChain

const isChain: (json) => boolean = wasm.wire_is_chain

One connected component with every vertex of degree at most 2 — a path or a simple cycle. An EMPTY complex is vacuously a chain.

Parameters

json

string

Returns

boolean


isClosed

const isClosed: (json) => boolean = wasm.wire_is_closed

A chain with no free ends. An empty complex is a chain but is NOT closed.

Parameters

json

string

Returns

boolean


transform

const transform: (json, matrix) => string = wasm.wire_transform

Apply an affine map and return a NEW Wire document (immutable).

Parameters

json

string

matrix

Float64Array

Returns

string


vertexPositions

const vertexPositions: (json) => Float64Array = wasm.wire_vertex_positions

Every distinct vertex position, flattened [x, y, z, ...] in first-appearance order.

Parameters

json

string

Returns

Float64Array

Last updated: 📖 1 min readEdit on GitHub