2017-02-26 20:46:33 +00:00
|
|
|
#ifndef slic3r_Format_AMF_hpp_
|
|
|
|
#define slic3r_Format_AMF_hpp_
|
|
|
|
|
|
|
|
namespace Slic3r {
|
|
|
|
|
|
|
|
class Model;
|
2018-11-07 13:57:50 +00:00
|
|
|
class DynamicPrintConfig;
|
2017-02-26 20:46:33 +00:00
|
|
|
|
2018-09-25 09:53:05 +00:00
|
|
|
// Load the content of an amf file into the given model and configuration.
|
Support for forward compatibility of configurations, user and system
config bundles, project files (3MFs, AMFs). When loading these files,
the caller may decide whether to substitute some of the configuration
values the current PrusaSlicer version does not understand with
some reasonable default value, and whether to report it. If substitution
is disabled, an exception is being thrown as before this commit.
If substitution is enabled, list of substitutions is returned by the
API to be presented to the user. This allows us to introduce for example
new firmware flavor key in PrusaSlicer 2.4 while letting PrusaSlicer
2.3.2 to fall back to some default and to report it to the user.
When slicing from command line, substutions are performed by default
and reported into the console, however substitutions may be either
disabled or made silent with the new "config-compatibility" command
line option.
Substitute enums and bools only. Allow booleans to be parsed as
true: "1", "enabled", "on" case insensitive
false: "0", "disabled", "off" case insensitive
This will allow us in the future for example to switch the draft_shield
boolean to an enum with the following values: "disabled" / "enabled" / "limited".
Added "enum_bitmask.hpp" - support for type safe sets of options.
See for example PresetBundle::load_configbundle(...
LoadConfigBundleAttributes flags) for an example of intended usage.
WIP: GUI for reporting the list of config substitutions needs to be
implemented by @YuSanka.
2021-06-27 14:04:23 +00:00
|
|
|
extern bool load_amf(const char* path, DynamicPrintConfig* config, ConfigSubstitutionContext* config_substitutions, Model* model, bool check_version);
|
2017-02-26 20:46:33 +00:00
|
|
|
|
2018-11-07 13:57:50 +00:00
|
|
|
// Save the given model and the config data into an amf file.
|
2018-02-14 13:30:03 +00:00
|
|
|
// The model could be modified during the export process if meshes are not repaired or have no shared vertices
|
2020-01-08 10:11:38 +00:00
|
|
|
extern bool store_amf(const char* path, Model* model, const DynamicPrintConfig* config, bool fullpath_sources);
|
2017-02-26 20:46:33 +00:00
|
|
|
|
2021-05-10 05:08:38 +00:00
|
|
|
} // namespace Slic3r
|
2017-02-26 20:46:33 +00:00
|
|
|
|
2018-09-25 09:53:05 +00:00
|
|
|
#endif /* slic3r_Format_AMF_hpp_ */
|