Fix parsing of IfcPropertyTableValue: handle parentheses in value lists#107
Open
giacomolamanna wants to merge 1 commit intoGeometryGym:mainfrom
Open
Fix parsing of IfcPropertyTableValue: handle parentheses in value lists#107giacomolamanna wants to merge 1 commit intoGeometryGym:mainfrom
giacomolamanna wants to merge 1 commit intoGeometryGym:mainfrom
Conversation
…lue lists
DefiningValues and DefinedValues were not parsed correctly when surrounded by parentheses like (IFCLABEL('X')). This fix removes the parentheses before calling SplitLineFields.
Author
|
Hi, just wondering if you had a chance to take a look at this PR. Let me know if there’s anything I should adjust or improve. |
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.
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.