Skip to content

Propose test cases for IfcProject/IfcContext and material properties (#435) - #452

Merged
andyward merged 2 commits into
buildingSMART:developmentfrom
BIMvoice:propose/ids-435-context-material-properties
Aug 5, 2026
Merged

andyward merged 2 commits into
buildingSMART:developmentfrom
BIMvoice:propose/ids-435-context-material-properties

Conversation

@BIMvoice

@BIMvoice BIMvoice commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

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 IfcProject under IFC4 because IfcProject moved from IfcObject to the new IfcContext supertype, plus his suggestion to also check IfcMaterialDefinition.

Before writing test cases we measured IfcOpenShell's own IDS implementation (IfcTester) against both claims:

  • IfcProject properties: correct in both IFC4 and IFC2X3. The underlying property lookup resolves IsDefinedBy through the schema declaration rather than special-casing IfcObject, so IfcContext.IsDefinedBy is picked up transparently.
  • IfcMaterialDefinition properties: correct under IFC4, but the check found that IfcTester itself crashed on IFC2X3 IfcExtendedMaterialProperties. Fixed separately in our own repository, unrelated to this one.

That measurement is what these 8 cases encode: pass/fail pairs for IfcProject under IFC4 (via IfcContext) and IFC2X3 (via IfcObject, the control proving IFC4 is the interesting case), and for IfcMaterial under 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 CreateTestCases could not be run. That was wrong. The build needs the .NET 8 runtime specifically, because Nuke uses BinaryFormatter, which .NET 9 removed. With that installed it runs in about a second. These .ids files 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.

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 andyward left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved with some edits to ensure the IDS Audit passes

@andyward
andyward merged commit d4341b7 into buildingSMART:development Aug 5, 2026
1 check passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in IDS development tracker Aug 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants