MeshLib Documentation
Loading...
Searching...
No Matches
Mesh Save

Functions

MRMESH_API Expected< void > MR::MeshSave::toMrmesh (const Mesh &mesh, const std::filesystem::path &file, const SaveSettings &settings={})
 
MRMESH_API Expected< void > MR::MeshSave::toMrmesh (const Mesh &mesh, std::ostream &out, const SaveSettings &settings={})
 
MRMESH_API Expected< void > MR::MeshSave::toOff (const Mesh &mesh, const std::filesystem::path &file, const SaveSettings &settings={})
 saves in .off file
 
MRMESH_API Expected< void > MR::MeshSave::toOff (const Mesh &mesh, std::ostream &out, const SaveSettings &settings={})
 
MRMESH_API Expected< void > MR::MeshSave::toObj (const Mesh &mesh, const std::filesystem::path &file, const SaveSettings &settings, int firstVertId)
 
MRMESH_API Expected< void > MR::MeshSave::toObj (const Mesh &mesh, std::ostream &out, const SaveSettings &settings, int firstVertId)
 
MRMESH_API Expected< void > MR::MeshSave::toObj (const Mesh &mesh, const std::filesystem::path &file, const SaveSettings &settings={})
 
MRMESH_API Expected< void > MR::MeshSave::toObj (const Mesh &mesh, std::ostream &out, const SaveSettings &settings={})
 
MRMESH_API Expected< void > MR::MeshSave::toBinaryStl (const Mesh &mesh, const std::filesystem::path &file, const SaveSettings &settings={})
 
MRMESH_API Expected< void > MR::MeshSave::toBinaryStl (const Mesh &mesh, std::ostream &out, const SaveSettings &settings={})
 
MRMESH_API Expected< void > MR::MeshSave::toAsciiStl (const Mesh &mesh, const std::filesystem::path &file, const SaveSettings &settings={})
 
MRMESH_API Expected< void > MR::MeshSave::toAsciiStl (const Mesh &mesh, std::ostream &out, const SaveSettings &settings={})
 
MRMESH_API Expected< void > MR::MeshSave::toPly (const Mesh &mesh, const std::filesystem::path &file, const SaveSettings &settings={})
 saves in .ply file
 
MRMESH_API Expected< void > MR::MeshSave::toPly (const Mesh &mesh, std::ostream &out, const SaveSettings &settings={})
 
MRMESH_API Expected< void > MR::MeshSave::toAnySupportedFormat (const Mesh &mesh, const std::filesystem::path &file, const SaveSettings &settings={})
 detects the format from file extension and save mesh to it
 
MRMESH_API Expected< void > MR::MeshSave::toAnySupportedFormat (const Mesh &mesh, const std::string &extension, std::ostream &out, const SaveSettings &settings={})
 extension in *.ext format
 

Detailed Description

Function Documentation

◆ toAnySupportedFormat() [1/2]

MRMESH_API Expected< void > MR::MeshSave::toAnySupportedFormat ( const Mesh & mesh,
const std::filesystem::path & file,
const SaveSettings & settings = {} )

detects the format from file extension and save mesh to it

◆ toAnySupportedFormat() [2/2]

MRMESH_API Expected< void > MR::MeshSave::toAnySupportedFormat ( const Mesh & mesh,
const std::string & extension,
std::ostream & out,
const SaveSettings & settings = {} )

extension in *.ext format

◆ toAsciiStl() [1/2]

MRMESH_API Expected< void > MR::MeshSave::toAsciiStl ( const Mesh & mesh,
const std::filesystem::path & file,
const SaveSettings & settings = {} )

saves in textual .stl file; SaveSettings::saveValidOnly = false is ignored

◆ toAsciiStl() [2/2]

MRMESH_API Expected< void > MR::MeshSave::toAsciiStl ( const Mesh & mesh,
std::ostream & out,
const SaveSettings & settings = {} )

◆ toBinaryStl() [1/2]

MRMESH_API Expected< void > MR::MeshSave::toBinaryStl ( const Mesh & mesh,
const std::filesystem::path & file,
const SaveSettings & settings = {} )

saves in binary .stl file; SaveSettings::saveValidOnly = false is ignored

◆ toBinaryStl() [2/2]

MRMESH_API Expected< void > MR::MeshSave::toBinaryStl ( const Mesh & mesh,
std::ostream & out,
const SaveSettings & settings = {} )

◆ toMrmesh() [1/2]

MRMESH_API Expected< void > MR::MeshSave::toMrmesh ( const Mesh & mesh,
const std::filesystem::path & file,
const SaveSettings & settings = {} )

saves in internal file format; SaveSettings::saveValidOnly = true is ignored

◆ toMrmesh() [2/2]

MRMESH_API Expected< void > MR::MeshSave::toMrmesh ( const Mesh & mesh,
std::ostream & out,
const SaveSettings & settings = {} )

◆ toObj() [1/4]

MRMESH_API Expected< void > MR::MeshSave::toObj ( const Mesh & mesh,
const std::filesystem::path & file,
const SaveSettings & settings,
int firstVertId )

saves in .obj file

Parameters
firstVertIdis the index of first mesh vertex in the output file (if this object is not the first there)

◆ toObj() [2/4]

MRMESH_API Expected< void > MR::MeshSave::toObj ( const Mesh & mesh,
const std::filesystem::path & file,
const SaveSettings & settings = {} )

◆ toObj() [3/4]

MRMESH_API Expected< void > MR::MeshSave::toObj ( const Mesh & mesh,
std::ostream & out,
const SaveSettings & settings,
int firstVertId )

◆ toObj() [4/4]

MRMESH_API Expected< void > MR::MeshSave::toObj ( const Mesh & mesh,
std::ostream & out,
const SaveSettings & settings = {} )

◆ toOff() [1/2]

MRMESH_API Expected< void > MR::MeshSave::toOff ( const Mesh & mesh,
const std::filesystem::path & file,
const SaveSettings & settings = {} )

saves in .off file

◆ toOff() [2/2]

MRMESH_API Expected< void > MR::MeshSave::toOff ( const Mesh & mesh,
std::ostream & out,
const SaveSettings & settings = {} )

◆ toPly() [1/2]

MRMESH_API Expected< void > MR::MeshSave::toPly ( const Mesh & mesh,
const std::filesystem::path & file,
const SaveSettings & settings = {} )

saves in .ply file

◆ toPly() [2/2]

MRMESH_API Expected< void > MR::MeshSave::toPly ( const Mesh & mesh,
std::ostream & out,
const SaveSettings & settings = {} )