From 26a9cec3041b7619e6b6b4922a239a3879d50a17 Mon Sep 17 00:00:00 2001 From: "xun.zhang" Date: Thu, 3 Jul 2025 17:14:34 +0800 Subject: [PATCH] FIX: display the minimum flush data 1. Use the minimum flush between nozzle volume and flush in datalist 2. Add a new param to decide the datalist to use 3. set for o1s github:7445 Signed-off-by: xun.zhang Change-Id: I7b3b69ee06f984b279ae4be47f70f5a472703b15 (cherry picked from commit 036fa80eea9ef8e02d9c9c9e6e7974d5a9a08131) --- resources/profiles/BBL/machine/Bambu Lab H2S 0.4 nozzle.json | 4 ++++ src/slic3r/Utils/CalibUtils.cpp | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/resources/profiles/BBL/machine/Bambu Lab H2S 0.4 nozzle.json b/resources/profiles/BBL/machine/Bambu Lab H2S 0.4 nozzle.json index f86c4def40..4ceb89c7b3 100644 --- a/resources/profiles/BBL/machine/Bambu Lab H2S 0.4 nozzle.json +++ b/resources/profiles/BBL/machine/Bambu Lab H2S 0.4 nozzle.json @@ -54,6 +54,10 @@ "32", "32" ], + "nozzle_flush_dataset": [ + "1", + "2" + ], "printable_area": [ "0x0", "340x0", diff --git a/src/slic3r/Utils/CalibUtils.cpp b/src/slic3r/Utils/CalibUtils.cpp index 4081d7b3a2..392a5661c5 100644 --- a/src/slic3r/Utils/CalibUtils.cpp +++ b/src/slic3r/Utils/CalibUtils.cpp @@ -866,6 +866,9 @@ void CalibUtils::set_for_auto_pa_model_and_config(const std::vector & // nozzle volume type std::vector& nozzle_volume_types = full_config.option("nozzle_volume_type", true)->values; nozzle_volume_types.resize(extruder_count, NozzleVolumeType::nvtStandard); + auto nozzle_flush_dataset = full_config.option("nozzle_flush_dataset", true)->values; + nozzle_flush_dataset.resize(extruder_count, 0); + int filament_nums = calib_infos.size(); std::vector physical_extruder_maps = dynamic_cast(full_config.option("physical_extruder_map", true))->values; for (size_t filament_index = 0; filament_index < calib_infos.size(); ++filament_index) { @@ -899,7 +902,7 @@ void CalibUtils::set_for_auto_pa_model_and_config(const std::vector & flush_matrix_vec.emplace_back(0); } else { - Slic3r::FlushVolCalculator calculator(min_flush_volumes[from_idx], Slic3r::g_max_flush_volume, extruder_count > 1, NozzleVolumeType(nozzle_volume_types[e_idx])); + Slic3r::FlushVolCalculator calculator(min_flush_volumes[from_idx], Slic3r::g_max_flush_volume, nozzle_flush_dataset[e_idx]); wxColour from = wxColour(filament_colors[from_idx]); wxColour to = wxColour(filament_colors[to_idx]); int volume = calculator.calc_flush_vol(from.Alpha(), from.Red(), from.Green(), from.Blue(), to.Alpha(), to.Red(), to.Green(), to.Blue());