Memory consumption of OCC interface

Hi all,

We have rather large geometries comprising multiple objects (up to a few thousand), which we generate using OCC. We found that a lot of memory is allocated in the geometry creation process.
When running NGSolve with MPI, where the geometry has to be known on all ranks to permit curved elements, the huge memory consumption is a bottleneck.
As a workaround, we found that exporting the geometry in BREP format works well:

The exported geometries can be used to curve a previously generated mesh and they consume very little memory.

The STEP export did not work very well because some geometries are not correctly exported (missing faces and volumes of intersecting objects).

Has anyone else faced similar issues and knows a better solution?
Otherwise, we’d be glad if the BREP export could be integrated into Netgen so that we can share our scripts using an official Netgen/NGsolve release.

I found out that the curving of MPI-distributed .vol-meshes works in the most recent version of NGSolve.
Still, the OCC interface consumes a lot of memory.
The BREP geometry that comes with the mesh file actually does not consume as much memory.