mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-07-08 18:44:35 +03:00
Removed Print.pm,
ported execution of post processing scripts into C++ (WIP, waits for update of boost::system module on our build server) Removed other mention of the "Controller".
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
|
||||
// Print now includes tbb, and tbb includes Windows. This breaks compilation of wxWidgets if included before wx.
|
||||
#include "../../libslic3r/Print.hpp"
|
||||
#include "../../libslic3r/GCode/PostProcessor.hpp"
|
||||
|
||||
//#undef NDEBUG
|
||||
#include <cassert>
|
||||
@@ -59,9 +60,12 @@ void BackgroundSlicingProcess::thread_proc()
|
||||
if (! m_print->canceled()) {
|
||||
wxQueueEvent(GUI::g_wxPlater, new wxCommandEvent(m_event_sliced_id));
|
||||
m_print->export_gcode(m_temp_output_path, m_gcode_preview_data);
|
||||
if (! m_print->canceled() && ! m_output_path.empty() &&
|
||||
copy_file(m_temp_output_path, m_output_path) != 0)
|
||||
throw std::runtime_error("Copying of the temporary G-code to the output G-code failed");
|
||||
if (! m_print->canceled() && ! m_output_path.empty()) {
|
||||
if (copy_file(m_temp_output_path, m_output_path) != 0)
|
||||
throw std::runtime_error("Copying of the temporary G-code to the output G-code failed");
|
||||
m_print->set_status(95, "Running post-processing scripts");
|
||||
run_post_process_scripts(m_output_path, m_print->config());
|
||||
}
|
||||
}
|
||||
} catch (CanceledException &ex) {
|
||||
// Canceled, this is all right.
|
||||
|
||||
@@ -611,13 +611,13 @@ void open_preferences_dialog(int event_preferences)
|
||||
dlg->ShowModal();
|
||||
}
|
||||
|
||||
void create_preset_tabs(bool no_controller, int event_value_change, int event_presets_changed)
|
||||
void create_preset_tabs(int event_value_change, int event_presets_changed)
|
||||
{
|
||||
update_label_colours_from_appconfig();
|
||||
add_created_tab(new TabPrint (g_wxTabPanel, no_controller), event_value_change, event_presets_changed);
|
||||
add_created_tab(new TabFilament (g_wxTabPanel, no_controller), event_value_change, event_presets_changed);
|
||||
add_created_tab(new TabSLAMaterial (g_wxTabPanel, no_controller), event_value_change, event_presets_changed);
|
||||
add_created_tab(new TabPrinter (g_wxTabPanel, no_controller), event_value_change, event_presets_changed);
|
||||
add_created_tab(new TabPrint (g_wxTabPanel), event_value_change, event_presets_changed);
|
||||
add_created_tab(new TabFilament (g_wxTabPanel), event_value_change, event_presets_changed);
|
||||
add_created_tab(new TabSLAMaterial (g_wxTabPanel), event_value_change, event_presets_changed);
|
||||
add_created_tab(new TabPrinter (g_wxTabPanel), event_value_change, event_presets_changed);
|
||||
}
|
||||
|
||||
std::vector<PresetTab> preset_tabs = {
|
||||
|
||||
@@ -165,7 +165,7 @@ extern void config_wizard(int run_reason);
|
||||
extern void open_preferences_dialog(int event_preferences);
|
||||
|
||||
// Create a new preset tab (print, filament and printer),
|
||||
void create_preset_tabs(bool no_controller, int event_value_change, int event_presets_changed);
|
||||
void create_preset_tabs(int event_value_change, int event_presets_changed);
|
||||
TabIface* get_preset_tab_iface(char *name);
|
||||
|
||||
// add it at the end of the tab panel.
|
||||
|
||||
@@ -71,14 +71,6 @@ void PreferencesDialog::build()
|
||||
option = Option (def, "preset_update");
|
||||
m_optgroup->append_single_option_line(option);
|
||||
|
||||
def.label = L("Disable USB/serial connection");
|
||||
def.type = coBool;
|
||||
def.tooltip = L("Disable communication with the printer over a serial / USB cable. "
|
||||
"This simplifies the user interface in case the printer is never attached to the computer.");
|
||||
def.default_value = new ConfigOptionBool{ app_config->get("no_controller")[0] == '1' }; // 1;
|
||||
option = Option (def,"no_controller");
|
||||
m_optgroup->append_single_option_line(option);
|
||||
|
||||
def.label = L("Suppress \" - default - \" presets");
|
||||
def.type = coBool;
|
||||
def.tooltip = L("Suppress \" - default - \" presets in the Print / Filament / Printer "
|
||||
@@ -118,8 +110,7 @@ void PreferencesDialog::build()
|
||||
|
||||
void PreferencesDialog::accept()
|
||||
{
|
||||
if (m_values.find("no_controller") != m_values.end()||
|
||||
m_values.find("no_defaults") != m_values.end()||
|
||||
if (m_values.find("no_defaults") != m_values.end()||
|
||||
m_values.find("use_legacy_opengl")!= m_values.end()) {
|
||||
warning_catcher(this, _(L("You need to restart Slic3r to make the changes effective.")));
|
||||
}
|
||||
|
||||
@@ -1528,6 +1528,7 @@ void TabPrinter::build_fff()
|
||||
};
|
||||
|
||||
|
||||
#if 0
|
||||
if (!m_no_controller)
|
||||
{
|
||||
optgroup = page->new_optgroup(_(L("USB/Serial connection")));
|
||||
@@ -1572,6 +1573,7 @@ void TabPrinter::build_fff()
|
||||
line.append_widget(serial_test);
|
||||
optgroup->append_line(line);
|
||||
}
|
||||
#endif
|
||||
|
||||
optgroup = page->new_optgroup(_(L("Printer Host upload")));
|
||||
|
||||
@@ -1745,8 +1747,10 @@ void TabPrinter::build_fff()
|
||||
|
||||
build_extruder_pages();
|
||||
|
||||
#if 0
|
||||
if (!m_no_controller)
|
||||
update_serial_ports();
|
||||
#endif
|
||||
}
|
||||
|
||||
void TabPrinter::build_sla()
|
||||
|
||||
@@ -170,7 +170,6 @@ protected:
|
||||
std::vector<PageShp> m_pages;
|
||||
bool m_disable_tree_sel_changed_event;
|
||||
bool m_show_incompatible_presets;
|
||||
bool m_no_controller;
|
||||
|
||||
std::vector<std::string> m_reload_dependent_tabs = {};
|
||||
enum OptStatus { osSystemValue = 1, osInitValue = 2 };
|
||||
@@ -199,8 +198,8 @@ public:
|
||||
|
||||
public:
|
||||
Tab() {}
|
||||
Tab(wxNotebook* parent, const wxString& title, const char* name, bool no_controller) :
|
||||
m_parent(parent), m_title(title), m_name(name), m_no_controller(no_controller) {
|
||||
Tab(wxNotebook* parent, const wxString& title, const char* name) :
|
||||
m_parent(parent), m_title(title), m_name(name) {
|
||||
Create(parent, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxBK_LEFT | wxTAB_TRAVERSAL, name);
|
||||
get_tabs_list().push_back(this);
|
||||
}
|
||||
@@ -282,8 +281,8 @@ class TabPrint : public Tab
|
||||
{
|
||||
public:
|
||||
TabPrint() {}
|
||||
TabPrint(wxNotebook* parent, bool no_controller) :
|
||||
Tab(parent, _(L("Print Settings")), "print", no_controller) {}
|
||||
TabPrint(wxNotebook* parent) :
|
||||
Tab(parent, _(L("Print Settings")), "print") {}
|
||||
~TabPrint(){}
|
||||
|
||||
ogStaticText* m_recommended_thin_wall_thickness_description_line;
|
||||
@@ -302,8 +301,8 @@ class TabFilament : public Tab
|
||||
ogStaticText* m_cooling_description_line;
|
||||
public:
|
||||
TabFilament() {}
|
||||
TabFilament(wxNotebook* parent, bool no_controller) :
|
||||
Tab(parent, _(L("Filament Settings")), "filament", no_controller) {}
|
||||
TabFilament(wxNotebook* parent) :
|
||||
Tab(parent, _(L("Filament Settings")), "filament") {}
|
||||
~TabFilament(){}
|
||||
|
||||
void build() override;
|
||||
@@ -335,7 +334,7 @@ public:
|
||||
PrinterTechnology m_printer_technology = ptFFF;
|
||||
|
||||
TabPrinter() {}
|
||||
TabPrinter(wxNotebook* parent, bool no_controller) : Tab(parent, _(L("Printer Settings")), "printer", no_controller) {}
|
||||
TabPrinter(wxNotebook* parent) : Tab(parent, _(L("Printer Settings")), "printer") {}
|
||||
~TabPrinter(){}
|
||||
|
||||
void build() override;
|
||||
@@ -357,8 +356,8 @@ class TabSLAMaterial : public Tab
|
||||
{
|
||||
public:
|
||||
TabSLAMaterial() {}
|
||||
TabSLAMaterial(wxNotebook* parent, bool no_controller) :
|
||||
Tab(parent, _(L("SLA Material Settings")), "sla_material", no_controller) {}
|
||||
TabSLAMaterial(wxNotebook* parent) :
|
||||
Tab(parent, _(L("SLA Material Settings")), "sla_material") {}
|
||||
~TabSLAMaterial(){}
|
||||
|
||||
void build() override;
|
||||
|
||||
Reference in New Issue
Block a user