Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commit65083fe8f2

README.md

group (nodebox)

Groups: named selections of the elements of one class of a geometry (point, primitive, vertex or edge). A group is an ordinary 0/1 attribute column of its name on that class, marked in the geometry's detail as a group, so group.list tells an empty selection apart from a name that was never made. Every node that takes a group input (geometry.extrude, geometry.solidify, geometry.bevel, geometry.selected and the rest) reads such a column.

  • Make a group: group.create (from a mask field or a column), group.by_bounds (inside a box, a sphere or a half-space), group.by_normal (facing a direction), group.by_random (a seeded share), group.by_island (whole connected pieces).
  • Change a group: group.combine (union, intersect, subtract or xor of two groups), group.invert, group.expand and group.shrink (whole rings of neighbours), group.remove.
  • Read groups: group.info (one group's counts and member ids), group.list (every group the geometry carries).
  • group.write (a mask stored as a marked group) and group.reach (the elements one ring out from a selection) are the parts the others are built from.

A node that makes or changes a group answers a copy of its geometry carrying the group. A group name starting with __ is refused.

local tops = g.group.by_normal({ geometry = g.mesh.box({}), name = "top", class = "primitive", direction = vector.create(0, 1, 0), angle = 10 })
local info = g.group.info({ geometry = tops, name = "top", class = "primitive", list_members = true })