enh: flow rate pattern calibration menu (#11956)

* feat: Add flow rate calibration pattern selector dialog

* feat: Integrate PR #11881 and improve Flow Rate Calibration Wizard

- Integrated PR #11881: Display layer duration in G-code viewer position window.
- Enhanced Flow Rate Calibration:
    - Implemented a Wizard dialog (FlowRateCalibrationDialog) using DPIDialog for Dark Mode support.
    - Restricted pattern selection to 'Archimedean Chords' and 'Monotonic'.
    - Integrated logic to pass the selected pattern to the calibration generation.

* fix(UI): Refactor FlowRateCalibrationDialog to calib_dlg for macOS build fix and UI consistency

Moved FlowRateCalibrationDialog from MainFrame.cpp to calib_dlg.hpp/.cpp to resolve build errors on macOS. Updated UI to match Pressure Advance calibration dialog style (Dark Mode support, RadioGroups). Logic moved to dialog class.

* Update Wiki link for flow rate calibration

* ui: replace RadioGroup with BitmapComboBox for Flow Rate pattern selection

* fix(ui): use custom ComboBox widget for Flow Rate Calibration

Replaces wxBitmapComboBox with OrcaSlicer's custom ComboBox widget to fix rendering issues on Windows (empty selection) and compilation errors on Linux.

* Refactor: Cleanup unused includes and members in FlowRate calibration dialog

* Fix: Complete rename of Flow Rate to Flow ratio in calibration menus after merge

* Fix: Update Flow Rate to Flow Ratio in Calibration Dialog and Wiki Link

---------

Co-authored-by: yw4z <ywsyildiz@gmail.com>
Co-authored-by: SoftFever <softfeverever@gmail.com>
This commit is contained in:
tome9111991
2026-04-24 15:39:32 +02:00
committed by GitHub
parent 91f54a07b9
commit 2af2f0f98b
7 changed files with 139 additions and 37 deletions

View File

@@ -12769,7 +12769,8 @@ void Plater::_calib_pa_select_added_objects() {
// Adjust settings for flowrate calibration
// For linear mode, pass 1 means normal version while pass 2 mean "for perfectionists" version
void adjust_settings_for_flowrate_calib(ModelObjectPtrs& objects, bool linear, int pass)
// ORCA: Add pattern parameter
void adjust_settings_for_flowrate_calib(ModelObjectPtrs& objects, bool linear, int pass, InfillPattern pattern)
{
auto print_config = &wxGetApp().preset_bundle->prints.get_edited_preset().config;
auto printerConfig = &wxGetApp().preset_bundle->printers.get_edited_preset().config;
@@ -12832,7 +12833,8 @@ void adjust_settings_for_flowrate_calib(ModelObjectPtrs& objects, bool linear, i
_obj->config.set_key_value("sparse_infill_pattern", new ConfigOptionEnum<InfillPattern>(ipRectilinear));
_obj->config.set_key_value("top_surface_line_width", new ConfigOptionFloatOrPercent(nozzle_diameter * 1.2f, false));
_obj->config.set_key_value("internal_solid_infill_line_width", new ConfigOptionFloatOrPercent(nozzle_diameter * 1.2f, false));
_obj->config.set_key_value("top_surface_pattern", new ConfigOptionEnum<InfillPattern>(ipArchimedeanChords));
// ORCA: use the pattern parameter
_obj->config.set_key_value("top_surface_pattern", new ConfigOptionEnum<InfillPattern>(pattern));
_obj->config.set_key_value("top_solid_infill_flow_ratio", new ConfigOptionFloat(1.0f));
_obj->config.set_key_value("infill_direction", new ConfigOptionFloat(45));
_obj->config.set_key_value("solid_infill_direction", new ConfigOptionFloat(135));
@@ -12883,7 +12885,8 @@ void adjust_settings_for_flowrate_calib(ModelObjectPtrs& objects, bool linear, i
wxGetApp().get_tab(Preset::TYPE_PRINTER)->reload_config();
}
void Plater::calib_flowrate(bool is_linear, int pass) {
// ORCA: Add pattern parameter
void Plater::calib_flowrate(bool is_linear, int pass, InfillPattern pattern) {
if (pass != 1 && pass != 2)
return;
wxString calib_name;
@@ -12915,7 +12918,8 @@ void Plater::calib_flowrate(bool is_linear, int pass) {
(boost::filesystem::path(Slic3r::resources_dir()) / "calib" / "filament_flow" / "flowrate-test-pass2.3mf").string());
}
adjust_settings_for_flowrate_calib(model().objects, is_linear, pass);
// ORCA: pass the pattern
adjust_settings_for_flowrate_calib(model().objects, is_linear, pass, pattern);
wxGetApp().get_tab(Preset::TYPE_PRINTER)->reload_config();
auto printer_config = &wxGetApp().preset_bundle->printers.get_edited_preset().config;
printer_config->set_key_value("resonance_avoidance", new ConfigOptionBool{false});