tumcms / Open-Infra-Platform

This is the official repository of the open-source Open Infra Platform software (as of April 2020).
Other
50 stars 23 forks source link

[BUG] IFC4 does not compile #534

Open christophKaiser opened 2 years ago

christophKaiser commented 2 years ago

Describe the bug The project OpenInfraPlatform.Core does not compile with IFC4. In the Output, the first error message is:

(...)\Core\src\IfcGeometryConverter\PlacementConverter.h(586,1): error C2146: syntax error: missing '>' before identifier 'IfcLinearPlacement'

To Reproduce Steps to reproduce the behavior:

  1. In CMake, select the option EARLYBINDING_WITH_IFC4
  2. Compile all steps according to SetupHelp.md
  3. The compiler error will appear during the project OpenInfraPlatform.Core

Expected behavior Even with IFC4, I would expect the solution to compile.

CMake configuration If applicable, list any special configurations you have selected in CMake.

Additional context According to the IFC documentation, the entity IfcLinearPlacement was introduced with IFC4x1 RC3 (link to documentation). Therefore, it will be some kind of undefined type in IFC4.

Probably, the option EARLYBINDING_WITH_IFC2x3 for IFC2x3 will bring up similar issues.

I was albe to find some kind of fix or work around with the if-condition

#if !(defined(OIP_MODULE_EARLYBINDING_IFC2X3) || defined(OIP_MODULE_EARLYBINDING_IFC4))
  // some source code with IfcLinearPlacement
#endif

However, after IfcLinearPlacement was excluded from the code for IFC4, other IFC entities come up with the same problem. Currently, on my list are:

At some point, the side effects on the entire namespace IfcGeometryConverter were to big to push a fast fix.

pjanck commented 2 years ago

See #334 as well.