mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-20 11:53:48 +00:00
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 <xun.zhang@bambulab.com> Change-Id: I7b3b69ee06f984b279ae4be47f70f5a472703b15 (cherry picked from commit 036fa80eea9ef8e02d9c9c9e6e7974d5a9a08131)
This commit is contained in:
@@ -54,6 +54,10 @@
|
|||||||
"32",
|
"32",
|
||||||
"32"
|
"32"
|
||||||
],
|
],
|
||||||
|
"nozzle_flush_dataset": [
|
||||||
|
"1",
|
||||||
|
"2"
|
||||||
|
],
|
||||||
"printable_area": [
|
"printable_area": [
|
||||||
"0x0",
|
"0x0",
|
||||||
"340x0",
|
"340x0",
|
||||||
|
|||||||
@@ -866,6 +866,9 @@ void CalibUtils::set_for_auto_pa_model_and_config(const std::vector<CalibInfo> &
|
|||||||
// nozzle volume type
|
// nozzle volume type
|
||||||
std::vector<int>& nozzle_volume_types = full_config.option<ConfigOptionEnumsGeneric>("nozzle_volume_type", true)->values;
|
std::vector<int>& nozzle_volume_types = full_config.option<ConfigOptionEnumsGeneric>("nozzle_volume_type", true)->values;
|
||||||
nozzle_volume_types.resize(extruder_count, NozzleVolumeType::nvtStandard);
|
nozzle_volume_types.resize(extruder_count, NozzleVolumeType::nvtStandard);
|
||||||
|
auto nozzle_flush_dataset = full_config.option<ConfigOptionIntsNullable>("nozzle_flush_dataset", true)->values;
|
||||||
|
nozzle_flush_dataset.resize(extruder_count, 0);
|
||||||
|
|
||||||
int filament_nums = calib_infos.size();
|
int filament_nums = calib_infos.size();
|
||||||
std::vector<int> physical_extruder_maps = dynamic_cast<ConfigOptionInts *>(full_config.option("physical_extruder_map", true))->values;
|
std::vector<int> physical_extruder_maps = dynamic_cast<ConfigOptionInts *>(full_config.option("physical_extruder_map", true))->values;
|
||||||
for (size_t filament_index = 0; filament_index < calib_infos.size(); ++filament_index) {
|
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<CalibInfo> &
|
|||||||
flush_matrix_vec.emplace_back(0);
|
flush_matrix_vec.emplace_back(0);
|
||||||
}
|
}
|
||||||
else {
|
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 from = wxColour(filament_colors[from_idx]);
|
||||||
wxColour to = wxColour(filament_colors[to_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());
|
int volume = calculator.calc_flush_vol(from.Alpha(), from.Red(), from.Green(), from.Blue(), to.Alpha(), to.Red(), to.Green(), to.Blue());
|
||||||
|
|||||||
Reference in New Issue
Block a user