@huukhanhnguyen/geometry / namespaces/Wire
namespaces/Wire
counts
constcounts: (json) =>Uint32Array=wasm.wire_counts
[edges, vertices] — the edge count and the number of DISTINCT vertices they reach.
Parameters
json
string
Returns
Uint32Array
edgeValue
constedgeValue: (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
constisChain: (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
constisClosed: (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
consttransform: (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
constvertexPositions: (json) =>Float64Array=wasm.wire_vertex_positions
Every distinct vertex position, flattened [x, y, z, ...] in first-appearance order.
Parameters
json
string
Returns
Float64Array