NEW: add align_to_y_axis option for auto-arrange

1. Add align_to_y_axis option for auto-arrange.
   This is useful for auto-arranging of i3 type printers.
2. Change default value of align_to_origin to true when switching
   from non-i3 printers to i3 printers.

JIRA: STUDIO-2583

Change-Id: I7dabab846022a0da030a9fec060a60a4207537a0
This commit is contained in:
manch1n 2023-08-18 19:47:35 +08:00 committed by Lane.Wei
parent e789489ed9
commit 7beed5d6dd
8 changed files with 142 additions and 6 deletions

View file

@ -1154,8 +1154,17 @@ void Sidebar::update_presets(Preset::Type preset_type)
printer_tab->update();
}
bool isBBL = wxGetApp().preset_bundle->printers.get_edited_preset().is_bbl_vendor_preset(wxGetApp().preset_bundle);
Preset& printer_preset = wxGetApp().preset_bundle->printers.get_edited_preset();
bool isBBL = printer_preset.is_bbl_vendor_preset(wxGetApp().preset_bundle);
wxGetApp().mainframe->show_calibration_button(!isBBL);
if (auto printer_structure_opt = printer_preset.config.option<ConfigOptionEnum<PrinterStructure>>("printer_structure")) {
wxGetApp().plater()->get_current_canvas3D()->get_arrange_settings().align_to_y_axis = (printer_structure_opt->value == PrinterStructure::psI3);
}
else
wxGetApp().plater()->get_current_canvas3D()->get_arrange_settings().align_to_y_axis = false;
break;
}