pub fn associate_constraint(
tx: &mut Transaction,
model: &Model,
draft: ConstraintAssociationDraft<'_>,
) -> ConstraintResult<EntityId>Expand description
Validate and stage one rooted constraint association.
§Release
Bound to the model’s declared release (#202): the record is laid out by
attribute name from that release’s table, and its references are checked
against it (RelatedObjects is IfcDefinitionSelect in IFC4 and IFC4X3,
IfcRoot restricted by WR21 in IFC2X3). OwnerHistory is left $,
which IFC4 and IFC4X3 allow and IFC2X3 does not, so an IFC2X3 model is
refused with ConstraintError::AuthoringRequired. Use
associate_constraint_with_owner_history there. IFC2X3 also requires
Intent, which IFC4 made optional.
§Errors
A malformed GlobalId, a relating constraint that is not an
IfcConstraint, an empty, duplicated or out-of-type RelatedObjects; a
model that binds no single known release
(ConstraintError::MultipleSchemas,
ConstraintError::UnsupportedSchema), and an IFC2X3 model. Nothing is
staged on an error.