ifcopenshell.util.constraint
¶
Module Contents¶
- ifcopenshell.util.constraint.get_constrained_elements(constraint: ifcopenshell.entity_instance) set[ifcopenshell.entity_instance] ¶
Retrieves the elements constrained by a constraint.
- Parameters:
product (ifcopenshell.entity_instance) – The IFC element.
- Returns:
Set of elements constrained by a constrant.
- Return type:
set[ifcopenshell.entity_instance]
- ifcopenshell.util.constraint.get_constraints(product: ifcopenshell.entity_instance) list[ifcopenshell.entity_instance] ¶
Retrieves the constraints assigned to the product.
- Parameters:
product (ifcopenshell.entity_instance) – The IFC element.
- Returns:
List of assigned constraints.
- Return type:
list[ifcopenshell.entity_instance]
- ifcopenshell.util.constraint.get_metric_constraints(resource: ifcopenshell.entity_instance, attribute) list[ifcopenshell.entity_instance] | None ¶
- ifcopenshell.util.constraint.get_metric_reference(metric: ifcopenshell.entity_instance, is_deep=True)¶
- ifcopenshell.util.constraint.get_metrics(constraint: ifcopenshell.entity_instance) list[ifcopenshell.entity_instance] ¶
Retrieves the list of nested constraints for a IfcObjective constraint.
- Parameters:
product (ifcopenshell.entity_instance) – IfcObjective constraint.
- Returns:
List of nested constraints.
- Return type:
list[ifcopenshell.entity_instance]
- ifcopenshell.util.constraint.is_attribute_locked(product: ifcopenshell.entity_instance, attribute) bool ¶
- ifcopenshell.util.constraint.is_hard_constraint(metric: ifcopenshell.entity_instance) bool ¶