{ params } | { points } | { cutters } for a curve; { cuts: ({ vertex } | { segment, t })[] } for a chain, members by id or #k. Required. In model.
options.scopestring
The node id minted ids are keyed under.
Required
options.dryRunboolean
Return the outline only. Default false.
options.tolerancenumber
Distance under which a point is on the curve and cuts merge. Default 1e-9 × the bounds diagonal. In model.
Returns
Ok with { outline, curves } (a curve’s pieces in parameter order) or { outline, chains }; the piece holding the input’s start keeps its id, each other is minted keyed by the input and the cut at its start.
Errors
Returned when an argument breaks its schema or its value rules: a point that is not [x, y], an id that is not Int32, a tolerance that is not positive.
A tool argument does not match the tool's input schema. Fix the argument named in paramPath.
Returned when a curve is degenerate or out of range, or an arc’s end is off its circle by more than the tolerance; paramPath names it.
A 2D curve, chain or region breaks the value rules: a number out of range, a degenerate curve, an arc end off its circle, a chain with a gap. Fix the value at paramPath; a full circle is kind circle, never an arc of 2π.
Returned when more than 100000 curves or cuts, more than 2²⁰ hits, or the call's work budget for the certified search ran out (40 000 boxes, about 600 ms at worst, certified closest points on cubics included; a tangency or overlap with a cubic); Curve2.intersect then carries the hits found so far in the diagnostic's measured.partial.
The call ran past its time budget and was stopped between nodes. Raise budgetMs, or simplify the graph.
Returned when kernel2d is not registered, or is older than 0.18.0.
The action is not available in the current context. Satisfy measured.requires first (e.g. create a node before editing one), or load the module measured.capability names (e.g. loadGeometryKernel() for kernel3d).
Returned when nothing cuts inside the curve or chain (a circle needs two cuts).
Nothing to do: the boundary does not cut the curve, nothing lies along its end, no cut is inside it, no fillet of that radius fits, an offset arc has no radius left. Check that the curves meet within the tolerance, or pass a larger tolerance.
Returned when a chain cut names a vertex or segment the chain does not have.
A set of elements cannot be carried to another revision: they no longer exist, or nothing sits where they were.
Guarantees
each piece ends exactly where the next starts; an arc’s pieces keep its centre bit for bit; the pieces’ lengths sum to the curve’s
The same result on every machine.
Example
TypeScript
const r = Curve2.split({ id: 1, minter: 0, kind: 'line', a: Point2.of(0, 0), b: Point2.of(10, 0) }, { params: [0.5] }, { scope: 'node-1'})r.ok ? r.value.outline : Result.error(r).code // → ok once loadGeometryKernel() has run; CAPABILITY_UNAVAILABLE before