GeometryGym / GeometryGymIFC

C# classes to generate and parse OpenBIM IFC files
Other
282 stars 97 forks source link

Error when reading a file that contains empty lines via stream #41

Closed bschorno closed 3 years ago

bschorno commented 3 years ago

I have an IFC step file with empty lines e.g. after the header section or between the tags in the data section. When I read it via textstream it causes an error in SerializationIfcSTEP->ReadStepStream

grafik

jmirtsch commented 3 years ago

Thanks for reporting this. I've just pushed a commit to the WorkInProgress branch that should resolve this. Let me know if you test it and still have problems. I plan to shortly update master branch and revise the nuget package.

bschorno commented 3 years ago

Thank you for the fast reply. The case on the screenshot work's now but I think there is still an issue when the step file has empty lines in the data section between the tags If also created a pull request where I fixed this problem, maybe you can check it out and merge. #42

Also in my pull request is a fix where the wrong string will be added to the list. I think it should be lines.add(str); https://github.com/GeometryGym/GeometryGymIFC/blob/a2863e13bdfc981dd5dc9ce27d58506da584c338/Core/IFC/DatabaseIFC.cs#L1841-L1853

jmirtsch commented 3 years ago

Thank you for the pull request and contributing to this project.

The changes look good, and I have merged them.