Repository navigation
Conversation
…the IDS facet IDSMaterial.test() only fetched the first applicable item, so every other element got no material result. An element without a material association of its own now uses its type's, both when testing and when the facet is used as applicability. The value is matched against every name the IDS material facet allows (material, layer set, profile and constituent set names, and the layers', profiles' and constituents' names and categories), and an element with nothing that matches fails instead of passing without a check. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
Description
IDSMaterial.test()fetches only the first applicable item (model.getItemsData([[...localIds][0]], …)), so every other element gets no material result. With a material requirement, a specification therefore reports one element instead of all of them.Elements without a material of their own also don't inherit their type's material, in either direction. As a requirement, a wall whose
IfcWallTypecarries the material fails. As applicability, it isn't selected. This is the "inheritance from the type" item under Material facet in #831.test()checks every applicable item. An item without its own material association uses its type's, and one with neither gets a failing check.getEntities()also selects the instances of a matching type that have no material association of their own. An occurrence's own material overrides the type's.IfcMaterialnames were compared, so an element whose layer set matched only by name passed without any check, and an element with an empty constituent set passed too.evalRequirementapplies them. I'll follow up on those once fix(ids): apply optional and prohibited cardinality to the property facet as a whole #822 lands.Additional context
TestCases/material): 26 of 29 agree (24 on main). The 3 left are the optional/prohibited cases, which depend on fix(ids): apply optional and prohibited cardinality to the property facet as a whole #822. Across all 307 non-invalid-cases, none stops agreeing.tests/fixtures/materials.ifcandfacets/material.test.ts. Both tests fail on main.vitest --run(IDS folder) passes andtsc -p tsconfig-build.json --noEmitis clean. Merges cleanly with fix(ids): apply optional and prohibited cardinality to the property facet as a whole #822.get_material(element, should_inherit=True), which IfcTester uses.What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following:
🤖 Generated with Claude Code