Edit Custom G-Codes Improvements

Orca: Added option to use CMake config option ORCA_CHECK_GCODE_PLACEHOLDERS to check custom gcode placeholders rather than using debug

Original Commit: prusa3d/PrusaSlicer@b8bb7f2

Co-authored-by: YuSanka <yusanka@gmail.com>
This commit is contained in:
Ocraftyone 2023-12-26 07:43:49 -05:00
parent 6539dc4efa
commit 0e590083fa
No known key found for this signature in database
GPG key ID: 85836ED21AD4D125
16 changed files with 491 additions and 350 deletions

View file

@ -156,7 +156,6 @@ struct LayerResult {
static LayerResult make_nop_layer_result() { return {"", std::numeric_limits<coord_t>::max(), false, false, true}; }
};
#define GET_CUSTOM_GCODE_PLACEHOLDERS 1
class GCode {
public:
@ -187,13 +186,6 @@ public:
{}
~GCode() = default;
#if GET_CUSTOM_GCODE_PLACEHOLDERS
std::map<std::string, DynamicConfig> g_code_placeholders_map;
const std::map<std::string, DynamicConfig>& get_g_code_placeholders_map() { return g_code_placeholders_map; }
const DynamicConfig& get_placeholder_parser_config() const { return m_placeholder_parser_integration.parser.config(); }
const DynamicConfig& get_placeholder_output_config() const { return m_placeholder_parser_integration.output_config; }
#endif
// throws std::runtime_exception on error,
// throws CanceledException through print->throw_if_canceled().
void do_export(Print* print, const char* path, GCodeProcessorResult* result = nullptr, ThumbnailsGeneratorCallback thumbnail_cb = nullptr);