MeshLib C++ Docs
Loading...
Searching...
No Matches
MR::MeshLoad Namespace Reference

compatibility names More...

Classes

struct  MeshLoader
struct  NamedMesh
struct  ObjLoadSettings
struct  StepLoadSettings
 STEP-specific mesh load parameters. More...

Typedefs

using MeshFileLoader = Expected<MR::Mesh>( * )( const std::filesystem::path&, const MeshLoadSettings& )
using MeshStreamLoader = Expected<MR::Mesh>( * )( std::istream&, const MeshLoadSettings& )

Functions

Expected< MeshfromCtm (const std::filesystem::path &file, const MeshLoadSettings &settings={})
 loads from .ctm file
Expected< MeshfromCtm (std::istream &in, const MeshLoadSettings &settings={})
Expected< MeshfromStep (const std::filesystem::path &path, const MeshLoadSettings &settings={}, const StepLoadSettings &stepSettings={})
 load mesh data from STEP file using OpenCASCADE
Expected< MeshfromStep (std::istream &in, const MeshLoadSettings &settings={}, const StepLoadSettings &stepSettings={})
Expected< std::shared_ptr< Object > > fromSceneStepFile (const std::filesystem::path &path, const MeshLoadSettings &settings={}, const StepLoadSettings &stepSettings={})
 load scene from STEP file using OpenCASCADE
Expected< std::shared_ptr< Object > > fromSceneStepFile (std::istream &in, const MeshLoadSettings &settings={}, const StepLoadSettings &stepSettings={})
Expected< MeshfromMrmesh (const std::filesystem::path &file, const MeshLoadSettings &settings={})
 loads mesh from file in internal MeshLib format
Expected< MeshfromMrmesh (std::istream &in, const MeshLoadSettings &settings={})
Expected< MeshfromOff (const std::filesystem::path &file, const MeshLoadSettings &settings={})
 loads mesh from file in .OFF format
Expected< MeshfromOff (std::istream &in, const MeshLoadSettings &settings={})
 loads mesh from stream in .OFF format
Expected< MeshfromObj (const std::filesystem::path &file, const MeshLoadSettings &settings={})
 loads mesh from file in .OBJ format
Expected< MeshfromObj (std::istream &in, const MeshLoadSettings &settings={})
Expected< MeshfromAnyStl (const std::filesystem::path &file, const MeshLoadSettings &settings={})
 loads mesh from file in any .STL format: both binary and ASCII
Expected< MeshfromAnyStl (std::istream &in, const MeshLoadSettings &settings={})
Expected< MeshfromBinaryStl (const std::filesystem::path &file, const MeshLoadSettings &settings={})
 loads mesh from file in binary .STL format
Expected< MeshfromBinaryStl (std::istream &in, const MeshLoadSettings &settings={})
Expected< MeshfromASCIIStl (const std::filesystem::path &file, const MeshLoadSettings &settings={})
 loads mesh from file in textual .STL format
Expected< MeshfromASCIIStl (std::istream &in, const MeshLoadSettings &settings={})
 loads mesh from stream in textual .STL format
Expected< MeshfromPly (const std::filesystem::path &file, const MeshLoadSettings &settings={})
 loads mesh from file in .PLY format;
Expected< MeshfromPly (std::istream &in, const MeshLoadSettings &settings={})
Expected< MeshfromDxf (const std::filesystem::path &path, const MeshLoadSettings &settings={})
 loads mesh from file in .DXF format;
Expected< MeshfromDxf (std::istream &in, const MeshLoadSettings &settings={})
 loads mesh from stream in .DXF format;
Expected< MeshfromAnySupportedFormat (const std::filesystem::path &file, const MeshLoadSettings &settings={})
 loads mesh from file in the format detected from file extension
Expected< MeshfromAnySupportedFormat (std::istream &in, const std::string &extension, const MeshLoadSettings &settings={})
MR_BIND_IGNORE void telemetryLogSize (const Mesh &mesh)
 emits telemetry signal with the integer logarithm of mesh size
Expected< std::vector< NamedMesh > > fromSceneObjFile (const std::filesystem::path &file, bool combineAllObjects, const ObjLoadSettings &settings={})
 loads meshes from .obj file
Expected< std::vector< NamedMesh > > fromSceneObjFile (std::istream &in, bool combineAllObjects, const std::filesystem::path &dir, const ObjLoadSettings &settings={})
Expected< std::vector< NamedMesh > > fromSceneObjFile (const char *data, size_t size, bool combineAllObjects, const std::filesystem::path &dir, const ObjLoadSettings &settings={})
Expected< LoadedObjectsloadObjectFromObj (const std::filesystem::path &file, const ProgressCallback &cb={})
 reads all objects from .OBJ file

Detailed Description

compatibility names

Function Documentation

◆ fromAnyStl() [1/2]

Expected< Mesh > MR::MeshLoad::fromAnyStl ( const std::filesystem::path & file,
const MeshLoadSettings & settings = {} )

loads mesh from file in any .STL format: both binary and ASCII

◆ fromAnyStl() [2/2]

Expected< Mesh > MR::MeshLoad::fromAnyStl ( std::istream & in,
const MeshLoadSettings & settings = {} )

loads mesh from stream in any .STL format: both binary and ASCII; important on Windows: in stream must be open in binary mode

◆ fromAnySupportedFormat() [1/2]

Expected< Mesh > MR::MeshLoad::fromAnySupportedFormat ( const std::filesystem::path & file,
const MeshLoadSettings & settings = {} )

loads mesh from file in the format detected from file extension

◆ fromAnySupportedFormat() [2/2]

Expected< Mesh > MR::MeshLoad::fromAnySupportedFormat ( std::istream & in,
const std::string & extension,
const MeshLoadSettings & settings = {} )

loads mesh from stream in the format detected from given extension-string (*.ext); important on Windows: in stream must be open in binary mode

◆ fromASCIIStl() [1/2]

Expected< Mesh > MR::MeshLoad::fromASCIIStl ( const std::filesystem::path & file,
const MeshLoadSettings & settings = {} )

loads mesh from file in textual .STL format

◆ fromASCIIStl() [2/2]

Expected< Mesh > MR::MeshLoad::fromASCIIStl ( std::istream & in,
const MeshLoadSettings & settings = {} )

loads mesh from stream in textual .STL format

◆ fromBinaryStl() [1/2]

Expected< Mesh > MR::MeshLoad::fromBinaryStl ( const std::filesystem::path & file,
const MeshLoadSettings & settings = {} )

loads mesh from file in binary .STL format

◆ fromBinaryStl() [2/2]

Expected< Mesh > MR::MeshLoad::fromBinaryStl ( std::istream & in,
const MeshLoadSettings & settings = {} )

loads mesh from stream in binary .STL format; important on Windows: in stream must be open in binary mode

◆ fromDxf() [1/2]

Expected< Mesh > MR::MeshLoad::fromDxf ( const std::filesystem::path & path,
const MeshLoadSettings & settings = {} )

loads mesh from file in .DXF format;

◆ fromDxf() [2/2]

Expected< Mesh > MR::MeshLoad::fromDxf ( std::istream & in,
const MeshLoadSettings & settings = {} )

loads mesh from stream in .DXF format;

◆ fromMrmesh() [1/2]

Expected< Mesh > MR::MeshLoad::fromMrmesh ( const std::filesystem::path & file,
const MeshLoadSettings & settings = {} )

loads mesh from file in internal MeshLib format

◆ fromMrmesh() [2/2]

Expected< Mesh > MR::MeshLoad::fromMrmesh ( std::istream & in,
const MeshLoadSettings & settings = {} )

loads mesh from stream in internal MeshLib format; important on Windows: in stream must be open in binary mode

◆ fromObj() [1/2]

Expected< Mesh > MR::MeshLoad::fromObj ( const std::filesystem::path & file,
const MeshLoadSettings & settings = {} )

loads mesh from file in .OBJ format

◆ fromObj() [2/2]

Expected< Mesh > MR::MeshLoad::fromObj ( std::istream & in,
const MeshLoadSettings & settings = {} )

loads mesh from stream in .OBJ format; important on Windows: in stream must be open in binary mode

◆ fromOff() [1/2]

Expected< Mesh > MR::MeshLoad::fromOff ( const std::filesystem::path & file,
const MeshLoadSettings & settings = {} )

loads mesh from file in .OFF format

◆ fromOff() [2/2]

Expected< Mesh > MR::MeshLoad::fromOff ( std::istream & in,
const MeshLoadSettings & settings = {} )

loads mesh from stream in .OFF format

◆ fromPly() [1/2]

Expected< Mesh > MR::MeshLoad::fromPly ( const std::filesystem::path & file,
const MeshLoadSettings & settings = {} )

loads mesh from file in .PLY format;

◆ fromPly() [2/2]

Expected< Mesh > MR::MeshLoad::fromPly ( std::istream & in,
const MeshLoadSettings & settings = {} )

loads mesh from stream in .PLY format; important on Windows: in stream must be open in binary mode

◆ fromSceneStepFile() [1/2]

Expected< std::shared_ptr< Object > > MR::MeshLoad::fromSceneStepFile ( const std::filesystem::path & path,
const MeshLoadSettings & settings = {},
const StepLoadSettings & stepSettings = {} )

load scene from STEP file using OpenCASCADE

◆ fromSceneStepFile() [2/2]

Expected< std::shared_ptr< Object > > MR::MeshLoad::fromSceneStepFile ( std::istream & in,
const MeshLoadSettings & settings = {},
const StepLoadSettings & stepSettings = {} )

◆ fromStep() [1/2]

Expected< Mesh > MR::MeshLoad::fromStep ( const std::filesystem::path & path,
const MeshLoadSettings & settings = {},
const StepLoadSettings & stepSettings = {} )

load mesh data from STEP file using OpenCASCADE

◆ fromStep() [2/2]

Expected< Mesh > MR::MeshLoad::fromStep ( std::istream & in,
const MeshLoadSettings & settings = {},
const StepLoadSettings & stepSettings = {} )

◆ telemetryLogSize()

MR_BIND_IGNORE void MR::MeshLoad::telemetryLogSize ( const Mesh & mesh)

emits telemetry signal with the integer logarithm of mesh size