Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commite8beb5604c

README.md

core.boundary (procNode)

The open edges of a geometry and the rings (or chains) they form, each ordered along its walk.

Built from core.edges, compact of the open edges, the loops kernel (the edge that follows each one), jump rounds (the smallest edge in reach, then the distance to the end of each list; the rounds are ceil(log2(edges))), loops_cut and loops_place, and scan of the ring lengths (segments = 0).

Inputs

  • geometry (Geometry). The geometry whose boundary is walked.

Outputs

  • edges: Record a, b, from, to, source, count of the open edges.
  • rings: Record ring, position, order, starts, count of the rings.

Example

local grid = g.mesh.grid({ size = { x = 2, z = 2 }, cells = { x = 2, z = 2 } })
local rim = g.core.boundary({ geometry = grid })

The grid's eight open edges come back in rim.edges, walked as one ring in rim.rings (rim.rings.count is 1).