buildingSMART / buildingSMART/IFC4.x-development
IfcConstraint inverses issue
- Dominant language
- Python
- Stars
- 234
- Forks
- 123
- Avg merge
- 15h 4m
- Merged PRs (30d)
- 5
Description
In the transition from IFC 2X3 to IFC4, a inverse attribute in [IfcConstraint](https://standards.buildingsmart.org/IFC/RELEASE/IFC4_3/HTML/lexical/IfcConstraint.htm) went missing.
As stated in the definition:
> [IfcConstraint](https://standards.buildingsmart.org/IFC/RELEASE/IFC4_3/HTML/lexical/IfcConstraint.htm) may be associated with any subtype of [IfcObjectDefinition](https://standards.buildingsmart.org/IFC/RELEASE/IFC4_3/HTML/lexical/IfcObjectDefinition.htm) or [IfcPropertyDefinition](https://standards.buildingsmart.org/IFC/RELEASE/IFC4_3/HTML/lexical/IfcPropertyDefinition.htm) through the [IfcRelAssociatesConstraint](https://standards.buildingsmart.org/IFC/RELEASE/IFC4_3/HTML/lexical/IfcRelAssociatesConstraint.htm) relationship to indicate a system-defined constraint, or may be associated with [IfcResourceObjectSelect](https://standards.buildingsmart.org/IFC/RELEASE/IFC4_3/HTML/lexical/IfcResourceObjectSelect.htm) (such as [IfcPropertySingleValue](https://standards.buildingsmart.org/IFC/RELEASE/IFC4_3/HTML/lexical/IfcPropertySingleValue.htm)) by [IfcResourceConstraintRelationship](https://standards.buildingsmart.org/IFC/RELEASE/IFC4_3/HTML/lexical/IfcResourceConstraintRelationship.htm) to indicate a user-defined constraint.
However, the only inverse attribute of this nature is the _PropertiesForConstraint_, which type is a SET [0:?] OF [IfcResourceConstraintRelationship](https://standards.buildingsmart.org/IFC/RELEASE/IFC4_3/HTML/lexical/IfcResourceConstraintRelationship.htm), and is described as "Reference to the properties to which the constraint is applied.".
Regarding this context, there are the following issues:
1. According to the quoted definition, [IfcResourceConstraintRelationship](https://standards.buildingsmart.org/IFC/RELEASE/IFC4_3/HTML/lexical/IfcResourceConstraintRelationship.htm) references resource objects, which contraries both name and description of the current inverse attribute (inherited from IFC 2X3).
2. The [IfcResourceConstraintRelationship](https://standards.buildingsmart.org/IFC/RELEASE/IFC4_3/HTML/lexical/IfcResourceConstraintRelationship.htm) definition says that "_An [IfcResourceConstraintRelationship](https://standards.buildingsmart.org/IFC/RELEASE/IFC4_3/HTML/lexical/IfcResourceConstraintRelationship.htm) allows for the specification of a constraint to be applied to many entity types. An important case is to apply constraints to properties. The constraints applied therefore enable a property to carry values identifying requirements as well as those identifying the fulfillment of those requirements._". This is not accurate, since [IfcPropertyDefinition](https://standards.buildingsmart.org/IFC/RELEASE/IFC4_3/HTML/lexical/IfcPropertyDefinition.htm) is not part of [IfcResourceObjectSelect](https://standards.buildingsmart.org/IFC/RELEASE/IFC4_3/HTML/lexical/IfcResourceObjectSelect.htm).
3. There is no inverse in [IfcConstraint](https://standards.buildingsmart.org/IFC/RELEASE/IFC4_3/HTML/lexical/IfcConstraint.htm) that references [IfcRelAssociatesConstraint](https://standards.buildingsmart.org/IFC/RELEASE/IFC4_3/HTML/lexical/IfcRelAssociatesConstraint.htm), the relationship that associates any subtype of [IfcObjectDefinition](https://standards.buildingsmart.org/IFC/RELEASE/IFC4_3/HTML/lexical/IfcObjectDefinition.htm) or [IfcPropertyDefinition](https://standards.buildingsmart.org/IFC/RELEASE/IFC4_3/HTML/lexical/IfcPropertyDefinition.htm) with the constraint.
4. The definition of [IfcRelAssociatesConstraint](https://standards.buildingsmart.org/IFC/RELEASE/IFC4_3/HTML/lexical/IfcRelAssociatesConstraint.htm) mentions its association with subtypes of [IfcRoot](https://standards.buildingsmart.org/IFC/RELEASE/IFC4_3/HTML/lexical/IfcRoot.htm), instead of [IfcDefinitionSelect](https://standards.buildingsmart.org/IFC/RELEASE/IFC4_3/HTML/lexical/IfcDefinitionSelect.htm).
Contributor guide
Research direction
Start by comparing the linked IFC4.3 definitions for IfcConstraint, IfcResourceConstraintRelationship, IfcRelAssociatesConstraint, and the referenced select types against the reported inverse attributes. Done means the inverse relationships, names, and descriptions consistently represent both resource and object/property associations.
Written by the indexing model from the issue text.
Assessment
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100