Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commitdd348ac6c3

README.md

geometry.separate (procNode)

Splits a geometry's triangles in two by a test. The value each triangle is tested by is the mask field when it is wired, else the named primitive attribute (field.attribute), else 0. Two comparisons against threshold follow (field.compare): strictly above, and at or below. elements.keep on the primitives runs once for each, so a holds the triangles above and b the rest. Both keep every point, and between them they hold every triangle once.

Inputs

  • geometry (Curves | Surface): whose triangles are divided. Point and detail attributes carry to both halves as they are; primitive and vertex attributes stay with each half's own triangles.
  • mask (Field): read once per triangle for which half it joins. Wired, it is what the split reads, and attribute is read only when this is empty.
  • threshold (Float, default 0.5): a triangle goes to a when its value is strictly above this, and to b otherwise.
  • attribute (String): a primitive attribute on the geometry to read the split from, instead of a wired mask. A name the triangles do not carry is refused.

Outputs

  • a: the triangles whose value is strictly above threshold.
  • b: the rest. A call answers both as a record by output name.

Which graph calls it

This node is built with proc.graph and g:node, and a proc.graph graph calls it as g:node("<id>", "geometry.separate", ...). A graph built with proc.define calls g.geometry.separate in its place, the node written in the call form; g.op.geometry.separate there is refused, naming it.