Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commitdd348ac6c3

README.md

curve.lay_points (procNode)

Points laid along curves end to end, a count for each curve: for each of size slots, the curve it belongs to and its place along that curve. Slots past the points the counts add up to name no curve.

The slots take the place of the curves' vertices and primitives: size vertices, and one primitive per count with vcount the counts and vstart the running sum of them (geometry.offsets). core.owner answers for every slot the curve it belongs to (owner) and its place along that curve (local_index). curve.smooth and points.on_curve lay their points through it.

Built from: geometry.offsets, core.owner, count writes on the vertex and primitive domains.

Inputs

  • curve (Curves). The curves the points are laid along; the slots take the place of their vertices and primitives.
  • counts (Column<Int>). How many points each curve takes.
  • size (Number). How many slots are laid out: at least the sum of the counts.

Outputs

  • owner: an Int column: the curve each slot belongs to.
  • local_index: an Int column: the slot's place along its curve, from 0.

Example

local line = g.curve.line({ start = vector.create(0, 0, 0), finish = vector.create(4, 0, 0), segments = 4 })
local slots = g.curve.lay_points({ curve = line, counts = g.core.column({ values = { 6 } }), size = 6 })

slots.owner holds 0 six times and slots.local_index holds 0 to 5.