xBimTeam / XbimEssentials

A .NET library to work with data in the IFC format. This is the core component of the Xbim Toolkit
https://xbimteam.github.io/
Other
485 stars 172 forks source link

Special unicode characters used in Name of IFCWALL cause no geometry to be displayed. #512

Open santiagoIT opened 1 year ago

santiagoIT commented 1 year ago

If you open the attached file in XBimXplorer 4.0, no geometry is displayed at all.

Using XBimXplorer 5.1 very few IFC elements are displayed.

image

The file contains IFCWALL's which have a Name with uncommon unicode chars: '\S\ ciana 1'

If \S\ is stripped out, all geometry displays fine.

image

might be useful: BimVision displays all geometry, and just seems to ignore those chars.

unicodeCharIssue.zip

andyward commented 1 year ago

Seems like there's a couple of different issues in this model throwing things out:

  1. The 0x0C (ASCII 12 = Form Feed?) in the unicode character name. E.g. on IfcWall Entity 1777
  2. Invalid parameter 5 on IfcRelVoidsElement ( # -1)

Issue 2 needs fixing at the source as it's just invalid output. Issue 1 we'd need to check with the Parser experts (@martin1cerny or @CBenghi ) - I'm not sure if this is valid, but I guess we could at least be more graceful of invalid ASCII chars in the input.

image

When I spotfixed the data by removing the invalid characters we got a much better result

image

The lack of openings in the walls is likely down to Issue 2

martin1cerny commented 1 year ago

IFC is defined to be an ASCII file, so Unicode characters are not allowed. However, I'll have a look how we can handle it better in the parser to make it more resilient.