MeshLib C++ Docs
Loading...
Searching...
No Matches
MRMesh/MRMeshLoad.h
Go to the documentation of this file.
1#pragma once
2
3#include "MRMeshFwd.h"
4#include "MRIOFilters.h"
5#include "MRId.h"
7#include "MRExpected.h"
9#include <filesystem>
10#include <istream>
11#include <string>
12
13namespace MR
14{
15
16// new simpler names
17
19MRMESH_API Expected<Mesh> loadMrmesh( const std::filesystem::path& file, const MeshLoadSettings& settings = {} );
20
23MRMESH_API Expected<Mesh> loadMrmesh( std::istream& in, const MeshLoadSettings& settings = {} );
24
26MRMESH_API Expected<Mesh> loadOff( const std::filesystem::path& file, const MeshLoadSettings& settings = {} );
27
29MRMESH_API Expected<Mesh> loadOff( std::istream& in, const MeshLoadSettings& settings = {} );
30
32MRMESH_API Expected<Mesh> loadObj( const std::filesystem::path& file, const MeshLoadSettings& settings = {} );
33
36MRMESH_API Expected<Mesh> loadObj( std::istream& in, const MeshLoadSettings& settings = {} );
37
39MRMESH_API Expected<Mesh> loadStl( const std::filesystem::path& file, const MeshLoadSettings& settings = {} );
40
43MRMESH_API Expected<Mesh> loadStl( std::istream& in, const MeshLoadSettings& settings = {} );
44
46MRMESH_API Expected<Mesh> loadBinaryStl( const std::filesystem::path& file, const MeshLoadSettings& settings = {} );
47
50MRMESH_API Expected<Mesh> loadBinaryStl( std::istream& in, const MeshLoadSettings& settings = {} );
51
53MRMESH_API Expected<Mesh> loadASCIIStl( const std::filesystem::path& file, const MeshLoadSettings& settings = {} );
54
56MRMESH_API Expected<Mesh> loadASCIIStl( std::istream& in, const MeshLoadSettings& settings = {} );
57
59MRMESH_API Expected<Mesh> loadPly( const std::filesystem::path& file, const MeshLoadSettings& settings = {} );
60
63MRMESH_API Expected<Mesh> loadPly( std::istream& in, const MeshLoadSettings& settings = {} );
64
66MRMESH_API Expected<Mesh> loadDxf( const std::filesystem::path& path, const MeshLoadSettings& settings = {} );
67
69MRMESH_API Expected<Mesh> loadDxf( std::istream& in, const MeshLoadSettings& settings = {} );
70
72MRMESH_API Expected<Mesh> loadMesh( const std::filesystem::path& file, const MeshLoadSettings& settings = {} );
73
76MRMESH_API Expected<Mesh> loadMesh( std::istream& in, const std::string& extension, const MeshLoadSettings& settings = {} );
77
78// compatibility names
79namespace MeshLoad
80{
81
85
87MRMESH_API Expected<Mesh> fromMrmesh( const std::filesystem::path& file, const MeshLoadSettings& settings = {} );
88
91MRMESH_API Expected<Mesh> fromMrmesh( std::istream& in, const MeshLoadSettings& settings = {} );
92
94MRMESH_API Expected<Mesh> fromOff( const std::filesystem::path& file, const MeshLoadSettings& settings = {} );
95
97MRMESH_API Expected<Mesh> fromOff( std::istream& in, const MeshLoadSettings& settings = {} );
98
100MRMESH_API Expected<Mesh> fromObj( const std::filesystem::path& file, const MeshLoadSettings& settings = {} );
101
104MRMESH_API Expected<Mesh> fromObj( std::istream& in, const MeshLoadSettings& settings = {} );
105
107MRMESH_API Expected<Mesh> fromAnyStl( const std::filesystem::path& file, const MeshLoadSettings& settings = {} );
108
111MRMESH_API Expected<Mesh> fromAnyStl( std::istream& in, const MeshLoadSettings& settings = {} );
112
114MRMESH_API Expected<Mesh> fromBinaryStl( const std::filesystem::path& file, const MeshLoadSettings& settings = {} );
115
118MRMESH_API Expected<Mesh> fromBinaryStl( std::istream& in, const MeshLoadSettings& settings = {} );
119
121MRMESH_API Expected<Mesh> fromASCIIStl( const std::filesystem::path& file, const MeshLoadSettings& settings = {} );
122
124MRMESH_API Expected<Mesh> fromASCIIStl( std::istream& in, const MeshLoadSettings& settings = {} );
125
127MRMESH_API Expected<Mesh> fromPly( const std::filesystem::path& file, const MeshLoadSettings& settings = {} );
128
131MRMESH_API Expected<Mesh> fromPly( std::istream& in, const MeshLoadSettings& settings = {} );
132
134MRMESH_API Expected<Mesh> fromDxf( const std::filesystem::path& path, const MeshLoadSettings& settings = {} );
135
137MRMESH_API Expected<Mesh> fromDxf( std::istream& in, const MeshLoadSettings& settings = {} );
138
140MRMESH_API Expected<Mesh> fromAnySupportedFormat( const std::filesystem::path& file, const MeshLoadSettings& settings = {} );
141
144MRMESH_API Expected<Mesh> fromAnySupportedFormat( std::istream& in, const std::string& extension, const MeshLoadSettings& settings = {} );
145
147
148} // namespace MeshLoad
149
150} // namespace MR
#define MRMESH_API
Definition MRMesh/MRMeshFwd.h:68
MRMESH_API Expected< Mesh > fromMrmesh(const std::filesystem::path &file, const MeshLoadSettings &settings={})
loads mesh from file in internal MeshLib format
MRMESH_API Expected< Mesh > fromObj(const std::filesystem::path &file, const MeshLoadSettings &settings={})
loads mesh from file in .OBJ format
MRMESH_API Expected< Mesh > fromDxf(const std::filesystem::path &path, const MeshLoadSettings &settings={})
loads mesh from file in .DXF format;
MRMESH_API Expected< Mesh > fromAnyStl(const std::filesystem::path &file, const MeshLoadSettings &settings={})
loads mesh from file in any .STL format: both binary and ASCII
MRMESH_API Expected< Mesh > fromPly(const std::filesystem::path &file, const MeshLoadSettings &settings={})
loads mesh from file in .PLY format;
MRMESH_API Expected< Mesh > fromBinaryStl(const std::filesystem::path &file, const MeshLoadSettings &settings={})
loads mesh from file in binary .STL format
MRMESH_API Expected< Mesh > fromOff(const std::filesystem::path &file, const MeshLoadSettings &settings={})
loads mesh from file in .OFF format
MRMESH_API Expected< Mesh > fromAnySupportedFormat(const std::filesystem::path &file, const MeshLoadSettings &settings={})
loads mesh from file in the format detected from file extension
MRMESH_API Expected< Mesh > fromASCIIStl(const std::filesystem::path &file, const MeshLoadSettings &settings={})
loads mesh from file in textual .STL format
MRMESH_API Expected< Mesh > loadPly(const std::filesystem::path &file, const MeshLoadSettings &settings={})
loads mesh from file in .PLY format;
MRMESH_API Expected< Mesh > loadDxf(const std::filesystem::path &path, const MeshLoadSettings &settings={})
loads mesh from file in .DXF format;
MRMESH_API Expected< Mesh > loadMesh(const std::filesystem::path &file, const MeshLoadSettings &settings={})
loads mesh from file in the format detected from file extension
MRMESH_API Expected< Mesh > loadMrmesh(const std::filesystem::path &file, const MeshLoadSettings &settings={})
loads mesh from file in internal MeshLib format
MRMESH_API Expected< Mesh > loadBinaryStl(const std::filesystem::path &file, const MeshLoadSettings &settings={})
loads mesh from file in binary .STL format
tl::expected< T, E > Expected
Definition MRExpected.h:58
MRMESH_API Expected< Mesh > loadOff(const std::filesystem::path &file, const MeshLoadSettings &settings={})
loads mesh from file in .OFF format
MRMESH_API Expected< Mesh > loadStl(const std::filesystem::path &file, const MeshLoadSettings &settings={})
loads mesh from file in any .STL format: both binary and ASCII
MRMESH_API Expected< Mesh > loadASCIIStl(const std::filesystem::path &file, const MeshLoadSettings &settings={})
loads mesh from file in textual .STL format
MRMESH_API Expected< Mesh > loadObj(const std::filesystem::path &file, const MeshLoadSettings &settings={})
loads mesh from file in .OBJ format
setting for mesh loading from external format, and locations of optional output data
Definition MRMeshLoadSettings.h:10