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
I encountered an issue with web-ifc where it fails to correctly parse IFC files containing the * symbol in certain fields. According to the IFC standard, * is a valid placeholder for an undefined value, but web-ifc does not seem to handle it properly. This leads to incorrect parsing results, especially when parsing relationships such as IFCRELAGGREGATES.
Here is an example of a problematic IFC snippet: #1 = IFCRELAGGREGATES('BohvtDLAfw6mzz2U8Z3f8j', *, $, $, #2, (#12));
and #13 = IFCRELCONTAINEDINSPATIALSTRUCTURE('Ey9YGvNEs4iJHMHGM1vuJq', *, $, $, (#14), #12);
Expected Behavior
The RelatingObject should be parsed as: { "value": 2, "type": 5 }
The RelatedObjects should be parsed as: [{ "value": 12, "type": 5 }]
Actual Behavior
Due to the presence of *, the parser incorrectly returns:
Okay, I understand. I found that this IFC file can be parsed by BIMvision correctly, and I guess it might have implemented some special logic to ignore this IFC syntax error.
What happened?
Description
I encountered an issue with
web-ifc
where it fails to correctly parse IFC files containing the*
symbol in certain fields. According to the IFC standard,*
is a valid placeholder for an undefined value, butweb-ifc
does not seem to handle it properly. This leads to incorrect parsing results, especially when parsing relationships such asIFCRELAGGREGATES
.Here is an example of a problematic IFC snippet:
#1 = IFCRELAGGREGATES('BohvtDLAfw6mzz2U8Z3f8j', *, $, $, #2, (#12));
and
#13 = IFCRELCONTAINEDINSPATIALSTRUCTURE('Ey9YGvNEs4iJHMHGM1vuJq', *, $, $, (#14), #12);
Expected Behavior
RelatingObject
should be parsed as:{ "value": 2, "type": 5 }
RelatedObjects
should be parsed as:[{ "value": 12, "type": 5 }]
Actual Behavior
Due to the presence of *, the parser incorrectly returns:
RelatingObject
:{ "value": undefined, "type": 5 }
RelatedObjects
:[]
Steps to Reproduce:
#1 = IFCRELAGGREGATES('BohvtDLAfw6mzz2U8Z3f8j', *, $, $, #2, (#12));
RelatingObject
andRelatedObjects
.Proposed Solutions:
*
as a$
value or equivalent during processing.Version
0.0.65
What browsers are you seeing the problem on?
No response
Relevant log output
ERROR: Invalid IFC Line:2 Uncaught TypeError: v[7]?.map is not a function
Anything else?
snippet.zip
The text was updated successfully, but these errors were encountered: