ifcopenshell.api.constraint.assign_constraint
#
Module Contents#
- class ifcopenshell.api.constraint.assign_constraint.Usecase(file, product=None, constraint=None)#
Assigns a constraint to a product
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.
- Parameters
product (ifcopenshell.entity_instance.entity_instance) – The product the constraint applies to. This is anything which can have properties or quantities.
constraint (ifcopenshell.entity_instance.entity_instance) – The IfcObjective constraint
- Returns
The new or updated IfcRelAssociatesConstraint relationship
- Return type
- execute(self)#
- get_constraint_rel(self)#