Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commite8beb5604c

README.md

group.create

Make a named group from a mask field (or an existing attribute column) over an element class. Element i joins when the mask reads above threshold. The group is written as a 0/1 column under its own name, and recorded so group.list reports it even when nothing matched.

Inputs

  • geometry (Geometry). The geometry the group is made on. A copy carrying the group comes out.
  • mask (Field, optional). A per-element mask: an element joins when it reads above threshold. Wire this or name a column the geometry already carries in name.
  • as (String, default ""). The name the group is written under.
  • class (String, default "point", one of "edge", "point", "primitive", "vertex"). The element class the group lives on: one flag per point, per triangle, per triangle corner or per unique point pair.
  • name (String, default ""). Name of a column already on class to read membership from, instead of the mask input. Read when mask is unwired; a name the class does not carry is refused.
  • threshold (Float, default 0.5). An element joins when its mask value is strictly above this.
  • invert (Bool, default false). true takes the complement: every element of the class the test did not select.

Outputs

  • geometry (Geometry). The input carrying the group as on class.
local pts = g.points.grid({ countX = 4, countZ = 4 })
local east = g.group.create({ geometry = pts, as = "east", mask = pts.point.P.x, threshold = 0 })