IfcOpenShell

IfcOpenShell

IfcOpenShell relies on OpenCASCADE Technology (OCCT) as a significant dependency. The latest master release, available at https://github.com/IfcOpenShell/IfcOpenShell.git), supports the older OCCT version 7.5.0, which unfortunately lacks Windows ARM support. In contrast, OCCT versions greater than 7.7.0 provide options for building on Windows on ARM (WoA). Attempts to build OCCT 7.5.0 were unsuccessful due to its age and incompatibility with Windows ARM.

Build latest OpenCASCADE Technology(OCCT)

The construction of limited OCCT is feasible, although some dependencies are absent for WoA, making it challenging to compile them.
Souce : https://github.com/Open-Cascade-SAS/OCCT.git

rmdir /s /q build-arm64-occt

cmake -B build-arm64-occt -A ARM64 -DCMAKE_BUILD_TYPE=Release ^
-DCMAKE_INSTALL_PREFIX=C:\dev\occt-arm64\install ^
-D3RDPARTY_USE_VCPKG=OFF ^
-DCMAKE_DISABLE_FIND_PACKAGE_VCPKG=ON ^
-DVCPKG_MANIFEST_MODE=OFF ^
-DBUILD_MODULE_Draw=OFF ^
-DBUILD_MODULE_Visualization=OFF ^
-DBUILD_MODULE_FreeImage=OFF ^
-DBUILD_MODULE_TKXmlTObj=OFF ^
-DBUILD_MODULE_TK=OFF ^
-DBUILD_MODULE_ApplicationFramework=ON ^
-DBUILD_MODULE_DataExchange=ON ^
-DUSE_FREETYPE=OFF

cmake --build build-arm64-occt --config Release --target install

It should build OCCT as required.

 

Building IfcOpenShell:

The project will focus on developing a limited version of IfcOpenShell due to the unavailability of certain dependencies for Windows ARM. This decision highlights the challenges faced in compatibility and support for Windows ARM64.

source: https://github.com/IfcOpenShell/IfcOpenShell.git)

rmdir /s /q build-arm64

cmake -B build-arm64 -A ARM64 -DCMAKE_BUILD_TYPE=Release ^
-DOCCT_INCLUDE_DIR="C:/dev/occt-arm64/install/inc" ^
-DOCCT_LIBRARY_DIR="C:/dev/occt-arm64/install/win64/vc14/lib" ^
-DWITH_CGAL=OFF ^
-DHDF5_SUPPORT=OFF ^
-DUSE_IFC_CSG=OFF ^
-DUSE_IFC_GEOM=ON ^
-DUSE_IFC_CONVERT=ON ^
-DCOLLADA_SUPPORT=OFF ^
-DHDF5_INCLUDE_DIR=C:/dummy ^
-DHDF5_LIBRARY_DIR=C:/dummy ^
-DEIGEN3_INCLUDE_DIR=C:/Users/User/source/repos/vcpkg/installed/arm64-windows/include ^
-DBUILD_IFCPYTHON=OFF ^
-DWITH_IFC_EXAMPLES=OFF

cmake --build build-arm64 --config Release --parallel

Work arounds in CMAKE file of IfcOpenShell:
1. To ensure proper functionality, adjustments are necessary in the CMAKE file of IfcOpenShell. Despite some naming discrepancies, everything operates smoothly after renaming. Specifically, the latest OCCT includes the Standard_VersionInfo.hxx file located in C:\dev\occt-arm64\install\inc, while IfcOpenShell expects it to be named Standard_Version.hxx. Therefore, renaming the file to Standard_Version.hxx resolves the issue, allowing everything to function correctly.

To successfully build the project, ensure to manually include DOCCT_INCLUDE_DIR and -DOCCT_LIBRARY_DIR in the CMAKE command, as there is no proper installation of OCCT for Windows ARM.

Some dependencies, such as HDF5 and COLLADA, are disabled due to the lack of WoA support.

Additionally, you may encounter link errors because IfCopenShell references an older version; this is caused by differing library names. To resolve missing libraries, rename or copy them, for example, using the commands:
C:\dev\occt-arm64\install> copy TKDEIGES.lib TKDEIGES.lib
C:\dev\occt-arm64\install> copy TKDESTEP.lib TKSTEPBase.lib.

The library TKDEIGES.lib has been copied and renamed to match the expected name, but it remains the same library. It functions as intended..

Build Results:

The directory C:/….source\repos\IfcOpenShell\cmake\build-arm64\Release should contain the following executables, which have successfully passed basic tests: IfcConvert.exe and IfcGeomServer.exe.

CMAKE Changes diff:

The provided diff file shows modifications made to a CMAKE file intended for building purposes. However, it notes that these changes have not been fully tested and may not be ready for a pull request (PR).