Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commitdd348ac6c3

README.md

topology.convert (procNode)

A component group moved between classes: points to the faces that use them, faces to their points, edges to their points, and back. mode = "any" selects a target element when any of its incident source elements is in the group, "all" when every one is; an element with no incident source element is selected under neither.

Inputs

  • geometry (Geometry): the geometry carrying the group.
  • group (String, default ""): the 0/1 attribute on from to convert. A name from does not carry is refused.
  • from (String, default "point"): the class the group is read from: "edge", "point", "primitive" or "vertex".
  • to (String, default "primitive"): the class the converted group is written to, from the same four.
  • mode (String, default "any"): how a target element reads the source elements incident to it: "any" selects it when at least one of them is in the group; "all" only when every one is.
  • output (String, default ""): the name the converted group is written under on to. Empty, it is group.

An element is in the group when its value is above 0.5; the converted group is 0/1.

Outputs

A call answers a record by output name.

  • geometry (Geometry): the input with the converted group on to.
  • converted (Data): from, to, mode, group (the name written), sourceCount, sourceSelected, targetCount and targetSelected.

Example

local box = g.mesh.box({})
box.point.high = g.compare(box.point.P.y, "gt", 0)
local faces = g.topology.convert({ geometry = box, group = "high", from = "point", to = "primitive", mode = "all" })