Block.faces_where_predicate
- Block.faces_where_predicate(predicate, data=False)
Get faces for which a certain condition or set of conditions is true using a lambda function.
- Parameters:
- predicatecallable
The condition you want to evaluate. The callable takes 2 parameters: the face identifier and the face attributes, and should return True or False.
- databool, 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.