mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-07-31 15:41:58 +08:00
Fix of SPE-1933
Fixing crash with pressure equalizer enabled. This crash was introduced with ArcWelder integration.
This commit is contained in:
parent
5b3dcc80f6
commit
f1952b9591
@ -1463,13 +1463,13 @@ void GCodeGenerator::process_layers(
|
||||
const auto smooth_path_interpolator = tbb::make_filter<void, std::pair<size_t, GCode::SmoothPathCache>>(slic3r_tbb_filtermode::serial_in_order,
|
||||
[this, &print, &layers_to_print, &layer_to_print_idx, &interpolation_params](tbb::flow_control &fc) -> std::pair<size_t, GCode::SmoothPathCache> {
|
||||
if (layer_to_print_idx >= layers_to_print.size()) {
|
||||
if ((!m_pressure_equalizer && layer_to_print_idx == layers_to_print.size()) || (m_pressure_equalizer && layer_to_print_idx == (layers_to_print.size() + 1))) {
|
||||
if (layer_to_print_idx == layers_to_print.size() + (m_pressure_equalizer ? 1 : 0)) {
|
||||
fc.stop();
|
||||
return {};
|
||||
} else {
|
||||
// Pressure equalizer need insert empty input. Because it returns one layer back.
|
||||
// Insert NOP (no operation) layer;
|
||||
return { ++ layer_to_print_idx, {} };
|
||||
return { layer_to_print_idx ++, {} };
|
||||
}
|
||||
} else {
|
||||
print.throw_if_canceled();
|
||||
@ -1561,13 +1561,13 @@ void GCodeGenerator::process_layers(
|
||||
const auto smooth_path_interpolator = tbb::make_filter<void, std::pair<size_t, GCode::SmoothPathCache>> (slic3r_tbb_filtermode::serial_in_order,
|
||||
[this, &print, &layers_to_print, &layer_to_print_idx, interpolation_params](tbb::flow_control &fc) -> std::pair<size_t, GCode::SmoothPathCache> {
|
||||
if (layer_to_print_idx >= layers_to_print.size()) {
|
||||
if ((!m_pressure_equalizer && layer_to_print_idx == layers_to_print.size()) || (m_pressure_equalizer && layer_to_print_idx == (layers_to_print.size() + 1))) {
|
||||
if (layer_to_print_idx == layers_to_print.size() + (m_pressure_equalizer ? 1 : 0)) {
|
||||
fc.stop();
|
||||
return {};
|
||||
} else {
|
||||
// Pressure equalizer need insert empty input. Because it returns one layer back.
|
||||
// Insert NOP (no operation) layer;
|
||||
return { ++ layer_to_print_idx, {} };
|
||||
return { layer_to_print_idx ++, {} };
|
||||
}
|
||||
} else {
|
||||
print.throw_if_canceled();
|
||||
|
Loading…
x
Reference in New Issue
Block a user