ENH: validate the config from 3mf and give some hints when there are errors

Change-Id: Ic25e5426e4e85a35a6a2413109f47b653955ec78
This commit is contained in:
lane.wei 2023-02-13 19:15:28 +08:00 committed by Lane.Wei
parent 84eebfc729
commit 9dceb42ba3
7 changed files with 174 additions and 76 deletions

View file

@ -378,8 +378,9 @@ public:
// BBS
void set_num_filaments(unsigned int num_filaments);
//BBS
// Validate the PrintConfig. Returns an empty string on success, otherwise an error message is returned.
std::string validate();
std::map<std::string, std::string> validate(bool under_cli = false);
// Verify whether the opt_key has not been obsoleted or renamed.
// Both opt_key and value may be modified by handle_legacy().
@ -953,7 +954,7 @@ PRINT_CONFIG_CLASS_DERIVED_DEFINE0(
)
// Validate the FullPrintConfig. Returns an empty string on success, otherwise an error message is returned.
std::string validate(const FullPrintConfig &config);
std::map<std::string, std::string> validate(const FullPrintConfig &config, bool under_cli = false);
PRINT_CONFIG_CLASS_DEFINE(
SLAPrintConfig,