Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commite8beb5604c

README.md

group.by_island

Group whole connected components: the islands core.islands labels, so an island id means the same shell to every node that reads one. select = "seeded" takes every island holding a member of the group named in seed; "largest" and "smallest" take the island holding the most or fewest elements of the class; "index" takes island number island, counting from 0 in face order. connectivity joins faces across a shared edge or a shared point; a point, corner or edge takes the island of the faces it belongs to.

Inputs

  • geometry (Geometry). The curves or surface whose connected pieces are grouped. A copy carrying the group comes out.
  • name (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.
  • select (String, default "largest", one of "index", "largest", "seeded", "smallest"). Which islands join. "largest" and "smallest" take the single island holding the most or fewest elements of class; "seeded" takes every island holding a member of the group named in seed; "index" takes island number island alone.
  • connectivity (String, default "edge", one of "edge", "point"). What joins two faces into one island: a shared edge, or a shared point.
  • seed (String, default ""). The existing group whose islands are grown to whole shells. Read when select is "seeded"; a name that is not a group of class is refused.
  • island (Float, default 0). Which island to take, counting from 0 in face order. Read when select is "index".
  • invert (Bool, default false). true takes the complement: every element of the class outside the chosen islands.

Outputs

  • geometry (Geometry). The input carrying the group name on class.
local biggest = g.group.by_island({ geometry = g.mesh.sphere({}), name = "main", class = "primitive", select = "largest" })