The OpenVolumeMesh library is equipped with a file manager class that allows reading polyhedral meshes from file as well as writing mesh objects to files. The format for these files is specified in Section File Format.
In this tutorial, we will learn how to use the file manager in order to permanently store mesh objects and read them.
Consider the following code for an example on how to write a polyhedral mesh to a file:
This works analogously for reading files into mesh objects. See the following code for an example.
Function OpenVolumeMesh::IO::FileManager::readFile() expects a total of four parameters, two of which are mandatory (file name and mesh reference). The other two parameters are optional flags that control whether bottom-up incidences should be computed automatically and whether a topology check should be performed when adding faces and cells. The two flags are turned on per default.