Open emanuelegoldin opened 1 month ago
A quick bit of investigation. IIfcCartesianPointList3D.TagList was not in IFC4.0 ADD2_TC1 but was added in IFC4.1 RC3, which was integrated in xbim April 2018. It was also in IFC4.2 and remains in IFC4.3_ADD2
However IFC4x1 (and 4x2) were subsequently withdrawn by BuildingSmart with the 4.3 release
Unfortunately IFC4 as a family of schemas doesn't really differentiate the exact schema used in the header. It's just FILE_SCHEMA(('IFC4'));
regardless of whether it's IFC4 ADD2 TC1 (official) or a later IFC4x1/x2, so we can't rely on that to indicate schema support.
I guess the options are:
XbimSchemaVersion.Ifc4x1
vs XbimSchemaVersion.Ifc4
- i.e. don't serialise Taglist etc if IFC4What do you think @martin1cerny?
Creating an IfcStore model from an IFC 4 file held the wrong syntax for the IfcCartesianPointList2D and IfcCartesianPointList3D objects.
Specifically, it adds a trailing attribute after the coordinate list.
Assemblies and versions affected:
Xbim.Ifc4 6.0.445
Steps (or code) to reproduce the issue:
Opening a file with valid syntax for IfcCartesianPointList2D entities and inspecting the model already shows the trailing attribute (no need for additional operations)
Minimal file to reproduce the issue:
simple_room.zip
Expected behavior:
Saved IFC 4 file after Xbim manipulation held valid ifc coordinates list entities
Actual behavior or exception details:
The saved file fails the validation
Additional Details
Looking into the documentation for various IFC standard versions, we figured that the definition of IfcCartesianPointList2D and IfcCartesianPointList3D changed moving from IFC 4 to IFC 4x3: in the former version, they both have a single attribute CoordList; the latter version introduced a second attribute TagList.
During the validation of the exported IFC file, we got the following error:
where you can see that the offended line has an unexpected second attribute (namely $).
Inspecting the IfcCartesianClassPointList2D.cs and IfcCartesianClassPointList3D.cs files in
XbimEssential/Xbim.Ifc4/GeometricModelResource
it seems that the TagList attribute is wrongly defined in the interface also for version IFC 4: