You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
IDS: an Entity facet with predefinedType throws on entities that have no PredefinedType attribute #819
IDSEntity.evalPredefinedType (facets/Entity.ts) does "value" in itemData.PredefinedType. Some entities have no PredefinedType attribute at all, for example IfcSite in IFC4, so their item data has no such key and the check throws:
TypeError: Cannot use 'in' operator to search for 'value' in undefined
It throws both when the facet is used as applicability (getEntities) and as a requirement (test), so a whole IDS check aborts on any model where such an entity reaches the facet. The same unguarded check is used on the type's attributes (typeAttrs.PredefinedType).
Reproduce
With the repo's own tests/fixtures/type-psets.ifc (it has one IfcSite):
A more common trigger than IfcSite: in models converted by IfcImporter, an occurrence whose own PredefinedType is unset ($, which is common in exported models) has no PredefinedType key in its item data either, so IFCWALL + a predefined type throws on such walls too.
Once the throw is guarded, a second problem shows: the inherited value is looked up only through IsTypedBy, but IfcImporter models link the type through IsDefinedBy. So a wall with an unset PredefinedType and a STANDARDIfcWallType would fail, where IDS passes it: see the buildingSMART IDS test cases entity/pass-inherited_predefined_types_should_pass and entity/fail-a_null_predefined_type_should_always_fail_a_specified_predefined_types, which throw on main and give the expected result with #820.
#820 now covers both, with a fixture for the inherited case.
Activity
helenkwok commentedon Oct 11, 2026
A more common trigger than
IfcSite: in models converted byIfcImporter, an occurrence whose ownPredefinedTypeis unset ($, which is common in exported models) has noPredefinedTypekey in its item data either, soIFCWALL+ a predefined type throws on such walls too.Once the throw is guarded, a second problem shows: the inherited value is looked up only through
IsTypedBy, butIfcImportermodels link the type throughIsDefinedBy. So a wall with an unsetPredefinedTypeand aSTANDARDIfcWallTypewould fail, where IDS passes it: see the buildingSMART IDS test casesentity/pass-inherited_predefined_types_should_passandentity/fail-a_null_predefined_type_should_always_fail_a_specified_predefined_types, which throw onmainand give the expected result with #820.#820 now covers both, with a fixture for the inherited case.