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
Returns

The new or updated IfcRelAssociatesConstraint relationship

Return type

ifcopenshell.entity_instance.entity_instance

execute(self)#
get_constraint_rel(self)#