Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commite8beb5604c

README.md

group.shrink

Erode the group named by name inward by rings adjacency rings: every ring drops the members that touch an element outside the selection (group.reach with "min"). A member no neighbour reaches stays. Written under as, which defaults to name. A name that is not a group of class is refused.

Inputs

  • geometry (Geometry). The geometry carrying the group. A copy carrying it eroded comes out.
  • name (String, default ""). The group to erode.
  • class (String, default "point", one of "edge", "point", "primitive", "vertex"). The element class the group lives on.
  • as (String, default ""). The name the eroded group is written under. Left empty it is name, eroding it in place.
  • rings (Float, default 1, at least 0). How many adjacency rings to erode by. Each ring reads the membership the previous one left and drops the members that touch an element outside it. 0 leaves the group as it is.

Outputs

  • geometry (Geometry). The input carrying the eroded group on class.
local tops = g.group.by_normal({ geometry = g.mesh.sphere({}), name = "top", class = "primitive", angle = 60 })
local core = g.group.shrink({ geometry = tops, name = "top", class = "primitive", rings = 1, as = "core" })