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
TestCase pass-specification_optionality_and_facet_optionality_can_be_combined not passes #402
importifcopenshellimportifctesterimportifctester.idsimportifctester.reporterimportwebbrowsermodel=ifcopenshell.open('pass-specification_optionality_and_facet_optionality_can_be_combined.ifc')
my_ids=ifctester.ids.open('pass-specification_optionality_and_facet_optionality_can_be_combined.ids')
my_ids.validate(model)
# return the check of specifications pass(true) or fail(false) with# and the name of the specification# and if all specifications of one IDS passall_spec_pass=Trueforspecinmy_ids.specifications:
print("name: {}, passed: {}".format(spec.name, spec.status))
ifnotspec.status:
all_spec_pass=Falseprint(">>>>>> ")
print("all checks of the specifications of this IDS pass: {}".format(all_spec_pass))
# for check the results of return aboveifctester.reporter.Console(my_ids).report()
return
name: Specification optionality and facet optionality can be combined, passed: False
>>>>>>
all checks of the specifications of this IDS pass: False
Specification optionality and facet optionality can be combined
[FAIL] (0/1) Specification optionality and facet optionality can be combined
Applies to:
All IFCWALL data
Requirements:
The Name shall be Waldo
The Description may be Foobar
The attribute value None is empty - #1=IfcWall('1hqIFTRjfV6AWq_bMtnZwI',$,'Waldo',$,$,$,$,$,$)
Reopening because I think this is potentially a bug in IDS itself. The test case says it should pass pass-specification_optionality_and_facet_optionality_can_be_combined not passes.ifc, however, the written documentation seems to contradict.
The attribute Description must not exist on applicable objects, even if empty.
And for optional it says:
If the attribute Description exists on applicable objects, it needs to have the value Answer.
From this, the word "exists" seems to mean is part of the schema definition, and has nothing to do with emptiness. Therefore, I'd say that the test case should fail, not pass.
Measured this rather than re-reading the spec text in isolation.
On the reported behaviour, optional plus an unset Description failing instead of passing: that is an implementation bug on our side, and there is already an unmerged fix for it, IfcOpenShell#7645 by @louistrue.
On the reopening question, we do not think this is an IDS bug.attribute-facet.md's REQUIRED with no value row defines populated as "not null". Reading OPTIONAL's "exists" any other way, as schema level presence, would make that word mean two different things one table row apart. property-facet.md's OPTIONAL row makes the intended reading explicit: "Lack of property is allowed."
So the fixture's PASS expectation matches the documented behaviour, and the current FAIL is the implementation, not the test case.
Separately, the same investigation turned up a related defect on the PROHIBITED row, which seems worth recording here since it comes from the same table.
That row says the attribute must not exist, even if empty. We were not enforcing the "even if empty" half:
prohibited, Description unset PASS correct
prohibited, Description = "" PASS should FAIL
prohibited, LayerOn = UNKNOWN PASS should FAIL
The cause is that empty values are stripped out before existence is decided, which is right for REQUIRED and OPTIONAL but makes a present-but-empty attribute indistinguishable from an absent one. Notably the Classification facet does not do that stripping and was already correct, so the three facets did not agree with each other.
Fixed on our side in IfcOpenShell#9273. Not proposing any specification change, the documentation was already clear on this. Flagging it only because the same "even if empty" phrasing appears in attribute-facet.md, property-facet.md and classification-facet.md, so other implementations may want to check the same case.
Activity
Moult commentedon Mar 11, 2025
This is not a bug in IDS? I'm closing this referencing it here: IfcOpenShell/IfcOpenShell#6323
Moult commentedon Feb 16, 2026
Reopening because I think this is potentially a bug in IDS itself. The test case says it should pass
pass-specification_optionality_and_facet_optionality_can_be_combined not passes.ifc, however, the written documentation seems to contradict.https://github.com/buildingSMART/IDS/blob/development/Documentation/UserManual/attribute-facet.md states for prohibited facets:
And for optional it says:
From this, the word "exists" seems to mean is part of the schema definition, and has nothing to do with emptiness. Therefore, I'd say that the test case should fail, not pass.
BIMvoice commentedon Aug 6, 2026
Measured this rather than re-reading the spec text in isolation.
On the reported behaviour, optional plus an unset
Descriptionfailing instead of passing: that is an implementation bug on our side, and there is already an unmerged fix for it, IfcOpenShell#7645 by @louistrue.On the reopening question, we do not think this is an IDS bug.
attribute-facet.md's REQUIRED with no value row defines populated as "not null". Reading OPTIONAL's "exists" any other way, as schema level presence, would make that word mean two different things one table row apart.property-facet.md's OPTIONAL row makes the intended reading explicit: "Lack of property is allowed."So the fixture's PASS expectation matches the documented behaviour, and the current FAIL is the implementation, not the test case.
Separately, the same investigation turned up a related defect on the PROHIBITED row, which seems worth recording here since it comes from the same table.
That row says the attribute must not exist, even if empty. We were not enforcing the "even if empty" half:
The cause is that empty values are stripped out before existence is decided, which is right for REQUIRED and OPTIONAL but makes a present-but-empty attribute indistinguishable from an absent one. Notably the
Classificationfacet does not do that stripping and was already correct, so the three facets did not agree with each other.Fixed on our side in IfcOpenShell#9273. Not proposing any specification change, the documentation was already clear on this. Flagging it only because the same "even if empty" phrasing appears in
attribute-facet.md,property-facet.mdandclassification-facet.md, so other implementations may want to check the same case.