Propose test cases for IfcProject/IfcContext and material properties (#435) - #452
Merged
andyward merged 2 commits intoAug 5, 2026
Conversation
Adds pass/fail pairs covering property facets on IfcProject under IFC4 (IfcContext) and IFC2X3 (IfcObject), and on IfcMaterial under both schemas (IfcMaterialProperties vs IfcExtendedMaterialProperties). Prompted by issue buildingSMART#435 (andyward): IfcProject moved from IfcObject to the new IfcContext supertype in IFC4, and xbim was found to miss properties on IfcProject under IFC4 as a result. These cases give the conformance suite explicit coverage of that boundary, plus the IfcMaterialDefinition sibling andyward flagged as worth checking too. Generated with the assistance of an AI coding tool.
…m audit The IDS audit flags up the use of reserved 'Pset' prefix so required change of Pset_Foo => Custom_Pset in tests and IFC files
andyward
approved these changes
Aug 5, 2026
andyward
left a comment
Contributor
There was a problem hiding this comment.
Approved with some edits to ensure the IDS Audit passes
This was referenced Aug 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This issue is assigned to @CBenghi, so this is offered as a starting point to take, change, or discard, not a claim on the work.
Prompted by @andyward's diagnosis in #435: xbim missed properties on
IfcProjectunder IFC4 becauseIfcProjectmoved fromIfcObjectto the newIfcContextsupertype, plus his suggestion to also checkIfcMaterialDefinition.Before writing test cases we measured IfcOpenShell's own IDS implementation (IfcTester) against both claims:
IfcProjectproperties: correct in both IFC4 and IFC2X3. The underlying property lookup resolvesIsDefinedBythrough the schema declaration rather than special-casingIfcObject, soIfcContext.IsDefinedByis picked up transparently.IfcMaterialDefinitionproperties: correct under IFC4, but the check found that IfcTester itself crashed on IFC2X3IfcExtendedMaterialProperties. Fixed separately in our own repository, unrelated to this one.That measurement is what these 8 cases encode: pass/fail pairs for
IfcProjectunder IFC4 (viaIfcContext) and IFC2X3 (viaIfcObject, the control proving IFC4 is the interesting case), and forIfcMaterialunder both schemas, since our own implementation shows this boundary is easy to get wrong on the material side even when the project side is fine.Each pass/fail pair shares the same specification so a pass alone cannot be mistaken for not-checked-at-all.
Correction: I originally wrote that
CreateTestCasescould not be run. That was wrong. The build needs the .NET 8 runtime specifically, because Nuke usesBinaryFormatter, which .NET 9 removed. With that installed it runs in about a second. These.idsfiles are still hand-authored; I am happy to regenerate them through the official build on request. Validation, unchanged: XSD-validated, and functionally verified pass/fail against IfcTester.@andyward @CBenghi
This PR was created with the assistance of an AI coding tool.