Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commitdd348ac6c3

README.md

curve.from_points (procNode)

One curve through a geometry's points, in order. The points keep every attribute they carry.

The vertex domain is one vertex per point reading its own point, and the primitive domain is the one curve: it starts at vertex 0, runs through every vertex and carries the closed flag. curve.line, curve.circle and curve.bezier end here.

Built from: member writes on the vertex and primitive domains, g.element.id.

Inputs

  • points (Geometry). The points the curve runs through, taken in the geometry's own order.
  • closed (Bool). Default false. true joins the last point back to the first; false leaves an open curve ending at the last point.

Outputs

  • curve: the points as one curve: a vertex per point, and one primitive with vstart 0, vcount the point count, closed 1 or 0 and curve 1.

Example

local points = g.points.grid({ countX = 4, countZ = 1, spacing = 1 })
local path = g.curve.from_points({ points = points, closed = true })