Skip to content

fix(ids): test every element in the material facet and match it like the IDS facet - #865

Open
havs-mc wants to merge 1 commit into
ThatOpen:mainfrom
havs-mc:fix/ids-material-all-items-and-type
Open

havs-mc wants to merge 1 commit into
ThatOpen:mainfrom
havs-mc:fix/ids-material-all-items-and-type

Conversation

@havs-mc

@havs-mc havs-mc commented Nov 11, 2026

Copy link
Copy Markdown

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 IfcWallType carries 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.
  • The value is matched against every name the material facet allows: the material's name or category, the layer, profile or constituent set's name, and each layer's, profile's or constituent's name or category. Before, only IfcMaterial names 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.
  • Optional and prohibited cardinality are unchanged here, since fix(ids): apply optional and prohibited cardinality to the property facet as a whole #822 changes how evalRequirement applies 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


What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

Before submitting the PR, please make sure you do the following:

  • Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
  • Follow the Conventional Commits v1.0.0 standard for PR naming.
  • Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves.
  • Ideally, include relevant tests that fail without this PR but pass with it.

🤖 Generated with Claude Code

…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

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant