mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2026-03-07 11:04:46 -07:00
AMS Filament sync fix for locked Tool 1 & 2 (#12180)
Toolchanger printers with 4 tools were incorrectly treated as dual-nozzle (IDEX-style) printers in AMS Sync. So I was locked to just tool 1/2.
Adjusted AMS Sync to use dual-nozzle logic only for true 2-nozzle setups (nozzle_nums == 2 and filament_map in {1,2}), and route 3+ tool toolchangers through the generic mapping flow so all tool IDs are handled correctly.
Before:
<img width="2276" height="1738" alt="image" src="https://github.com/user-attachments/assets/ccebc020-37cf-4af6-8568-a9f331f6c08c" />
After:
<img width="2236" height="1662" alt="image" src="https://github.com/user-attachments/assets/030f49c3-463d-4355-95ba-ba8f95a01ecd" />
Tested on / with:
- Snamaker U1
- ARM macOS
This commit is contained in:
parent
bab3c72e4f
commit
1aee0cf526
1 changed files with 24 additions and 7 deletions
|
|
@ -222,8 +222,27 @@ bool SyncAmsInfoDialog::get_is_double_extruder()
|
|||
{
|
||||
const auto &full_config = wxGetApp().preset_bundle->full_config();
|
||||
size_t nozzle_nums = full_config.option<ConfigOptionFloats>("nozzle_diameter")->values.size();
|
||||
bool use_double_extruder = nozzle_nums > 1 ? true : false;
|
||||
return use_double_extruder;
|
||||
// This dialog has dedicated left/right layout logic only for true 2-nozzle printers.
|
||||
// For toolchangers with 3+ tools (or any filament_map beyond {1,2}),
|
||||
// fall back to the generic list flow so all tools are shown.
|
||||
if (nozzle_nums != 2)
|
||||
return false;
|
||||
|
||||
auto *plater = wxGetApp().plater();
|
||||
if (!plater)
|
||||
return true;
|
||||
auto *plate = plater->get_partplate_list().get_curr_plate();
|
||||
if (!plate)
|
||||
return true;
|
||||
|
||||
const auto &project_config = wxGetApp().preset_bundle->project_config;
|
||||
auto filament_maps = plate->get_real_filament_maps(project_config);
|
||||
for (int map_id : filament_maps) {
|
||||
if (map_id != 1 && map_id != 2) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool SyncAmsInfoDialog::is_dirty_filament() {
|
||||
|
|
@ -2386,7 +2405,7 @@ void SyncAmsInfoDialog::update_show_status()
|
|||
size_t nozzle_nums = full_config.option<ConfigOptionFloats>("nozzle_diameter")->values.size();
|
||||
|
||||
// the nozzle type of preset and machine are different
|
||||
if (nozzle_nums > 1) {
|
||||
if (get_is_double_extruder()) {
|
||||
wxString error_message;
|
||||
if (!is_nozzle_type_match(*obj_->GetExtderSystem(), error_message)) {
|
||||
std::vector<wxString> params{error_message};
|
||||
|
|
@ -2721,9 +2740,7 @@ void SyncAmsInfoDialog::reset_and_sync_ams_list()
|
|||
DeviceManager *dev_manager = Slic3r::GUI::wxGetApp().getDeviceManager();
|
||||
if (!dev_manager) return;
|
||||
MachineObject *obj_ = dev_manager->get_selected_machine();
|
||||
const auto & full_config = wxGetApp().preset_bundle->full_config();
|
||||
size_t nozzle_nums = full_config.option<ConfigOptionFloats>("nozzle_diameter")->values.size();
|
||||
if (nozzle_nums > 1) {
|
||||
if (get_is_double_extruder()) {
|
||||
m_mapping_popup.set_show_type(ShowType::LEFT_AND_RIGHT);//special
|
||||
}
|
||||
// m_mapping_popup.set_show_type(ShowType::RIGHT);
|
||||
|
|
@ -3350,4 +3367,4 @@ bool FinishSyncAmsDialog::Layout()
|
|||
return true;
|
||||
}
|
||||
|
||||
}} // namespace Slic3r
|
||||
}} // namespace Slic3r
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue