Module Contents

class ifcopenshell.api.constraint.assign_constraint.Usecase
get_constraint_rels() list[ifcopenshell.entity_instance]
ifcopenshell.api.constraint.assign_constraint.assign_constraint(file: ifcopenshell.file, products: list[ifcopenshell.entity_instance], constraint: ifcopenshell.entity_instance) ifcopenshell.entity_instance | None

Assigns a constraint to a list of products

This assigns a relationship between a product and a constraint, so that when a product’s properties and quantities do not match the requirements of the constraint’s metrics, results can be flagged.

It is assumed (but not explicit in the IFC documentation) that constraints are inherited from the type. This way, it is not necessary to create lots of constraint assignments.


The new or updated IfcRelAssociatesConstraint relationship or None if products was an empty list.

Return type: