MeshLib C++ Docs
Loading...
Searching...
No Matches
MRGcodeSave.h
Go to the documentation of this file.
1#pragma once
2#include "MRMeshFwd.h"
3#include "MRIOFilters.h"
5#include "MRExpected.h"
6#include <filesystem>
7#include <iosfwd>
8#include <string>
9
10namespace MR
11{
12
13namespace GcodeSave
14{
15
19
20MRMESH_API extern const IOFilters Filters;
21
23MRMESH_API Expected<void> toGcode( const GcodeSource& gcode, const std::filesystem::path& file, ProgressCallback callback = {} );
24
25MRMESH_API Expected<void> toGcode( const GcodeSource& gcode, std::ostream& out, ProgressCallback callback = {} );
26
27
29MRMESH_API Expected<void> toAnySupportedFormat( const GcodeSource& gcode, const std::filesystem::path& file, ProgressCallback callback = {} );
31MRMESH_API Expected<void> toAnySupportedFormat( const GcodeSource& gcode, std::ostream& out, const std::string& extension, ProgressCallback callback = {} );
32
34
35}
36
37}
#define MRMESH_API
Definition MRMeshFwd.h:85
std::function< bool(float)> ProgressCallback
Definition MRMeshFwd.h:790
Expected< void > toAnySupportedFormat(const GcodeSource &gcode, const std::filesystem::path &file, ProgressCallback callback={})
detects the format from file extension and saves G-code in it
const IOFilters Filters
Expected< void > toGcode(const GcodeSource &gcode, const std::filesystem::path &file, ProgressCallback callback={})
saves G-code commands in *.gcode file (or any text file), one command per line
std::vector< std::string > GcodeSource
Definition MRMeshFwd.h:712
tl::expected< T, E > Expected
Definition MRExpected.h:31
std::vector< IOFilter > IOFilters
Definition MRIOFilters.h:32
Definition MRGcodeSave.h:14
Only strictly necessary for the bindings (to make MR::MeshIntersectionResult a complete type).
Definition MRCameraOrientationPlugin.h:8