diff --git a/src/slic3r/GUI/SelectMachine.cpp b/src/slic3r/GUI/SelectMachine.cpp index d18435d1a9..a60c8149f1 100644 --- a/src/slic3r/GUI/SelectMachine.cpp +++ b/src/slic3r/GUI/SelectMachine.cpp @@ -1124,7 +1124,10 @@ bool SelectMachineDialog::do_ams_mapping(MachineObject *obj_,bool use_ams) int filament_result = 0; std::vector map_opt; //four values: use_left_ams, use_right_ams, use_left_ext, use_right_ext - if (nozzle_nums > 1){ + // Orca: only do the per-physical-extruder left/right split when the device actually reports + // 2+ extruders. A non-BBL multi-nozzle printer (e.g. Snapmaker U1) reports a single extruder + // with one filament pool, so it maps as a single surface via the else branch below. + if (nozzle_nums > 1 && obj_->GetExtderSystem()->GetTotalExtderCount() > 1){ //get nozzle property, the extders are same? if (true/*!can_hybrid_mapping(obj_get_extder_data())*/){ std::vector m_ams_mapping_result_left, m_ams_mapping_result_right; @@ -5498,8 +5501,8 @@ void SelectMachineDialog::reset_and_sync_ams_list() item = new MaterialItem(m_filament_left_panel, colour_rgb, _L(display_materials[extruder])); m_sizer_ams_mapping_left->Add(item, 0, wxALL, FromDIP(5)); } - else if (m_filaments_map[extruder] == 2) - { + else // map == 2, or (non-BBL multi-nozzle) 3+; update_material_item_pos() collapses + { // these into the single panel when the device reports < 2 extruders. item = new MaterialItem(m_filament_right_panel, colour_rgb, _L(display_materials[extruder])); m_sizer_ams_mapping_right->Add(item, 0, wxALL, FromDIP(5)); } diff --git a/src/slic3r/Utils/QidiPrinterAgent.cpp b/src/slic3r/Utils/QidiPrinterAgent.cpp index bcc3b7723d..69b751fb45 100644 --- a/src/slic3r/Utils/QidiPrinterAgent.cpp +++ b/src/slic3r/Utils/QidiPrinterAgent.cpp @@ -1,5 +1,6 @@ #include "QidiPrinterAgent.hpp" #include "Http.hpp" +#include "IPrinterAgent.hpp" #include "libslic3r/PresetBundle.hpp" #include "slic3r/GUI/GUI_App.hpp" @@ -48,6 +49,13 @@ AgentInfo QidiPrinterAgent::get_agent_info_static() return AgentInfo{"qidi", "Qidi", QidiPrinterAgent_VERSION, "Qidi printer agent"}; } +FilamentSyncMode QidiPrinterAgent::get_filament_sync_mode() const +{ + if (GUI::wxGetApp().app_config->get_bool("use_printer_agents")) + return FilamentSyncMode::subscription; + return FilamentSyncMode::pull; +} + bool QidiPrinterAgent::fetch_filament_info(std::string dev_id, FilamentSyncMode sync_mode) { if (sync_mode != get_filament_sync_mode()) diff --git a/src/slic3r/Utils/QidiPrinterAgent.hpp b/src/slic3r/Utils/QidiPrinterAgent.hpp index 05697fc66d..a74cf317d2 100644 --- a/src/slic3r/Utils/QidiPrinterAgent.hpp +++ b/src/slic3r/Utils/QidiPrinterAgent.hpp @@ -34,7 +34,7 @@ public: int start_local_print_with_record(PrintParams params, OnUpdateStatusFn update_fn, WasCancelledFn cancel_fn, OnWaitFn wait_fn) override; int start_sdcard_print(PrintParams params, OnUpdateStatusFn update_fn, WasCancelledFn cancel_fn) override; - FilamentSyncMode get_filament_sync_mode() const override { return FilamentSyncMode::subscription; } + FilamentSyncMode get_filament_sync_mode() const override; private: // Push enable_box + value_t SAVE_VARIABLEs before a print starts. diff --git a/src/slic3r/Utils/SnapmakerPrinterAgent.cpp b/src/slic3r/Utils/SnapmakerPrinterAgent.cpp index 3e465cb855..fe1a29af53 100644 --- a/src/slic3r/Utils/SnapmakerPrinterAgent.cpp +++ b/src/slic3r/Utils/SnapmakerPrinterAgent.cpp @@ -1,11 +1,13 @@ #include "SnapmakerPrinterAgent.hpp" #include "Http.hpp" +#include "IPrinterAgent.hpp" #include "libslic3r/PresetBundle.hpp" #include "slic3r/GUI/GUI_App.hpp" #include "nlohmann/json.hpp" #include #include +#include #include namespace Slic3r { @@ -271,4 +273,11 @@ bool SnapmakerPrinterAgent::fetch_filament_info(std::string dev_id, FilamentSync return true; } +FilamentSyncMode SnapmakerPrinterAgent::get_filament_sync_mode() const +{ + if (GUI::wxGetApp().app_config->get_bool("use_printer_agents")) + return FilamentSyncMode::subscription; + return FilamentSyncMode::pull; +} + } // namespace Slic3r diff --git a/src/slic3r/Utils/SnapmakerPrinterAgent.hpp b/src/slic3r/Utils/SnapmakerPrinterAgent.hpp index 62cde387c5..5f7b6b1c30 100644 --- a/src/slic3r/Utils/SnapmakerPrinterAgent.hpp +++ b/src/slic3r/Utils/SnapmakerPrinterAgent.hpp @@ -18,6 +18,7 @@ public: AgentInfo get_agent_info() override { return get_agent_info_static(); } bool fetch_filament_info(std::string dev_id, FilamentSyncMode sync_mode = FilamentSyncMode::pull) override; + FilamentSyncMode get_filament_sync_mode() const override; int connect_printer(std::string dev_id, std::string dev_ip, std::string username, std::string password, bool use_ssl) override; int command_start_camera(std::string dev_id) override;