Suggestion: Parsing incomplete and buggy IFC files #3257
Replies: 2 comments 5 replies
-
Yes, the structure of the code using exceptions has upsides and downsides. But we have try-catch blocks at various levels in the code. Somehow this one seeps through and isn't caught. Especially in the iterator https://github.com/IfcOpenShell/IfcOpenShell/blob/v0.7.0/src/ifcgeom/IfcGeomIteratorImplementation.h So for now I think the solution should be along those lines. Any help appreciated. The long term solution is obviously drastic, where somehow we should only operate on valid subgraphs from the model. But the question is what constitutes a valid subgraph (if an irrelevant attribute is wrongly populated, can we still use that subgraph?) and what delineates the various subgraphs (if the material association is invalid, can we still process the geometry of the element for ex.?) |
Beta Was this translation helpful? Give feedback.
-
Hi @aothms, I have a small fix for this issue and would like to create a pull request. I created a branch and I am trying to push it but I get this error:
Could I be given the permission to push a branch? |
Beta Was this translation helpful? Give feedback.
-
Hello everyone,
I have been dealing with a strange IFC file that renders fine on Solibri but crashes on IFCConvert. After I spent some time inspecting the file, I realised that the file itself was buggy. In a nutshell, it was using
IFCRELASSOCIATESMATERIAL
without actually specifying the material.Here is my proposal:
Can we make IFCConvert more flexible and do its best to render incomplete/buggy files?
Current behaviour:
As soon as a mandatory parameter is not found, an exception is thrown and IFCConvert terminates.
Worry owner:
I propose to be the person to do the actual work. I will modify the ifc parser to handle buggy/incomplete ifc files.
Please give me your thoughts.
Additional information
Here is some more information the crash I am experiencing:
I have truncated the reduced the IFC file to just 81 lines which I am reproducing at the end of this message.
To fix the file, two lines are needed. A
IFCMaterial
definition:#76= IFCMATERIAL('Solid');
And an update to the
IFCRELASSOCIATESMATERIAL
as such:#52=IFCRELASSOCIATESMATERIAL('1kN1AIT199XQkai3RCRaow',#1,'IfcRelAssociatesMaterial',$,(#55),#76);
The IFC file:
Beta Was this translation helpful? Give feedback.
All reactions