Fix parsing of IfcPropertyTableValue: handle parentheses in value lists #107
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.
Summary
This pull request fixes a parsing issue in the
IfcPropertyTableValue.parsemethod.Problem
When
.ifcfiles include value lists like(IFCLABEL('X')), the GeometryGym parser did not handle them correctly because the parentheses were not removed before callingSplitLineFields.As a result,
DefiningValuesandDefinedValueswere not being populated.Solution
This fix adds a check that strips the outer parentheses from the string (if present) before parsing. This allows correct handling of value lists.
Impact
The change affects only
IfcPropertyTableValue.parse()and is backward-compatible. All other classes are untouched.Test Case
This issue was identified while parsing the official buildingSMART IDS test case:
📂
fail-any_matching_value_in_a_table_property_will_pass_3_3.ifc📎 Test file link on GitHub
With this fix,
DefiningValuesandDefinedValuesin theIfcPropertyTableValueare correctly populated.