I noticed a bug when importing surf files into Netgen. The z-coordinates of all points seem to be multiplied by 10. This can be seen when importing a surf file using the GUI and visualising it, or when calculating the bounding box of an imported surf mesh. The coordinates in the surf file are what I would expect them to be, so this has to be something that happens when the file is imported.
Moreover, when I try to convert an imported mesh to an ngsolve mesh, I get the error “netgen.libngpy._meshing.NgException: mesh with negative boundary-condition number” even if the surf file was originally exported from Netgen.
I am using the nightly build NGSolve-6.2.2009-24-g53c262fa.
I am attaching two scripts which should reproduce this problem. The script export.py will generate a cube, mesh it, print the bounding box and export the surface mesh as a surf file. The script import.py will import the generated surf file and calculate the bounding box.