mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-06-15 08:23:00 +00:00
FIX:The estimated flushing amount of consumables for multi-color printing is inaccurate.
change: Multiply the flush_volumes_matrix in the exported gcode by the coefficient and output the final value. Also fixed the issue where the flush matrix page was limited to 900, but the Gcode output value could be greater than 900 (the product of the matrix and the multiplier was limited to 900 before storing the value) jira: STUDIO-13332 Change-Id: I893f27bec206c3b9da3273241d1cd5f1883e55a9 (cherry picked from commit 8aa91cd86c8c75b3736c616bcfbed4872db9734c) (cherry picked from commit 038fc1c18220cef8c269d272059afea503fb5d5b)
This commit is contained in:
@@ -411,6 +411,21 @@ WipingDialog::WipingDialog(wxWindow* parent, const std::vector<std::vector<int>>
|
||||
store_matrixs.emplace_back((*iter).get<std::vector<double>>());
|
||||
}
|
||||
std::vector<double>store_multipliers = j["flush_multiplier"].get<std::vector<double>>();
|
||||
{// limit all matrix value before write to gcode, the limitation is depends on the multipliers
|
||||
size_t cols_temp_matrix = 0;
|
||||
if (!store_matrixs.empty()) { cols_temp_matrix = store_matrixs[0].size(); }
|
||||
if (store_multipliers.size() == store_matrixs.size() && cols_temp_matrix>0) // nuzzles==nuzzles
|
||||
{
|
||||
for (size_t idx = 0; idx < store_multipliers.size(); ++idx) {
|
||||
double m_max_flush_volume_t = (double)m_max_flush_volume, m_store_multipliers=store_multipliers[idx];
|
||||
std::transform(store_matrixs[idx].begin(), store_matrixs[idx].end(),
|
||||
store_matrixs[idx].begin(),
|
||||
[m_max_flush_volume_t, m_store_multipliers](double inputx) {
|
||||
return std::clamp(inputx, 0.0, m_max_flush_volume_t / m_store_multipliers);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
this->StoreFlushData(extruder_num, store_matrixs, store_multipliers);
|
||||
m_submit_flag = true;
|
||||
this->Close();
|
||||
|
||||
Reference in New Issue
Block a user