Example of usage of netgen::WriteUserFormat


I am trying to write o mesh in STL Format. I read that I should use the function WriteUserFormat to do that, but I get an exception.

netgen::WriteUserFormat(std::string(“STL Format”), *mesh, std::filesystem::path(“mesh.stl”));

Eccezione generata in corrispondenza di 0x00007FFFAED110BB (vcruntime140.dll) in TestNetGen.exe: 0xC0000005: violazione di accesso durante la lettura del percorso 0x000000E2F7100000.

Do you have any suggestion?