#include <MRMesh/MRMesh.h>
#include <MRMesh/MRMeshLoad.h>
#include <MRMesh/MRMeshSave.h>
#include <iostream>
int main()
{
std::filesystem::path inFilePath = "mesh.stl";
if ( loadRes.has_value() )
{
std::cerr << loadRes.error() << std::endl;
return 1;
}
std::filesystem::path outFilePath = "mesh.ply";
if ( !saveRes.has_value() )
{
std::cerr << saveRes.error() << std::endl;
return 1;
}
std::filesystem::path outCtmFilePath = "mesh.ctm";
if ( !saveRes.has_value() )
{
std::cerr << saveRes.error() << std::endl;
return 1;
}
return 0;
}
MRMESH_API Expected< Mesh > fromAnySupportedFormat(const std::filesystem::path &file, const MeshLoadSettings &settings={})
MRMESH_API Expected< void > toAnySupportedFormat(const Mesh &mesh, const std::filesystem::path &file, const SaveSettings &settings={})
MRIOEXTRAS_API Expected< void > toCtm(const Mesh &mesh, const std::filesystem::path &file, const CtmSaveOptions &options)
Further examples won't check return values for sake of clarity