Mesh.edges_where_predicate

Mesh.edges_where_predicate(predicate, data=False)[source]

Get edges for which a certain condition or set of conditions is true using a lambda function.

Parameters
  • predicate (callable) – The condition you want to evaluate. The callable takes 3 parameters: the identifier of the first vertex, the identifier of the second vertex, and the edge attributes, and should return True or False.

  • data (bool, optional) – If True, yield the vertex attributes in addition ot the vertex identifiers.

Yields

tuple[int, int] | tuple[tuple[int, int], dict[str, Any]] – If data is False, the next edge as a (u, v) tuple. If data is True, the next edge as a (u, v, data) tuple.