Builtin Library
- ..
- .metadata283 B
- README.md1.2 KB
- info.module
- init.luau2.0 KB
README.md
group.info
One group in detail, as Data: name, class, members, elements, fraction and, with list_members, the member element ids. A group that exists and holds nothing reports members = 0; a name that is not a group is an error.
Inputs
geometry(Geometry). The geometry carrying the group described.name(String, default ""). The group to report on. A name that is not a group onclassis an error.class(String, default "point", one of "edge", "point", "primitive", "vertex"). The element class the group lives on.list_members(Bool, default false). true also returns every member's element id ininfo.ids, in ascending order; false reports the counts alone.
Outputs
info(Data).name,class,members(how many elements are in the group),elements(how many the class holds),fraction(members over elements, 0 for a class with no elements) and, withlist_members,ids.
local tops = g.group.by_normal({ geometry = g.mesh.box({}), name = "top", class = "primitive", angle = 10 })
local info = g.group.info({ geometry = tops, name = "top", class = "primitive", list_members = true })