blob: 6be1d148b60c99a0febdad362818e772c9bf6314 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
#ifndef SLIC3R_HPP
#define SLIC3R_HPP
#include "libslic3r/Config.hpp"
#include "libslic3r/Model.hpp"
namespace Slic3r {
namespace IO {
enum ExportFormat : int {
AMF,
OBJ,
STL,
// SVG,
TMF,
Gcode
};
}
class CLI {
public:
int run(int argc, char **argv);
DynamicPrintConfig& full_print_config() { return m_print_config; }
private:
DynamicPrintAndCLIConfig m_config;
DynamicPrintConfig m_print_config;
DynamicPrintConfig m_extra_config;
std::vector<std::string> m_input_files;
std::vector<std::string> m_actions;
std::vector<std::string> m_transforms;
std::vector<Model> m_models;
bool setup(int argc, char **argv);
/// Prints usage of the CLI.
void print_help(bool include_print_options = false, PrinterTechnology printer_technology = ptFFF | ptSLA | ptSLS) const;
/// Exports loaded models to a file of the specified format, according to the options affecting output filename.
bool export_models(IO::ExportFormat format);
bool has_print_action() const { return m_config.opt_bool("export_gcode") || m_config.opt_bool("export_sla"); }
std::string output_filepath(const Model &model, IO::ExportFormat format) const;
};
}
#endif
|