Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commitdd348ac6c3

README.md

curve.resample (procNode)

Lay every curve of a geometry out again as points evenly spaced along it by arc length: a set number per curve, or as many as a spacing fits. The new points carry the attributes of the points they lie between, blended.

The count per curve is count, or at a spacing as many as fit its length (at least 2); the points are laid by arc length with the curve's attributes blended onto them.

Built from: core.resample.curve, attribute.number.

Inputs

  • curve (Curves). The curves to resample. Each keeps its shape, its open/closed choice and its place among the others.
  • spacing (Float). Default 0. At least 0. The distance between neighbouring points. 0 uses count instead.
  • count (Float). Default 16. At least 2. How many points each curve is laid out with when spacing is 0.

Outputs

  • curve: the resampled curves, each point numbered as id. The points also carry what core.resample.curve writes on them: the sampling attributes (prim, ia, ib, ic, bary, t, tangent) and s and length.

Example

local line = g.curve.line({ start = vector.create(0, 0, 0), finish = vector.create(4, 0, 0), segments = 4 })
local even = g.curve.resample({ curve = line, spacing = 0.5 })

Nine points, 0.5 apart along the line.