Mesh.faces_where_predicate
- Mesh.faces_where_predicate(predicate, data=False)[source]
Get faces 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 2 parameters: the face identifier and the face attributes, and should return True or False.
data (bool, optional) – If True, yield the face attributes in addition to the face identifiers.
- Yields
int | tuple[int, dict[str, Any]] – If data is False, the next face that matches the condition. If data is True, the next face and its attributes.