FIX: z speed smoothing crash while by object print
Jira: none and add protect for calculating loop connection Signed-off-by: qing.zhang <qing.zhang@bambulab.com> Change-Id: Ie74280403d8afc55e699a30f3d1e69afdc41a86d
This commit is contained in:
parent
b52a9de509
commit
f82b599bd4
|
@ -2619,7 +2619,7 @@ void GCode::process_layers(
|
||||||
for (size_t layer_idx = range.begin(); layer_idx < range.end(); ++layer_idx) {
|
for (size_t layer_idx = range.begin(); layer_idx < range.end(); ++layer_idx) {
|
||||||
print.throw_if_canceled();
|
print.throw_if_canceled();
|
||||||
if (layer_idx > 0) {
|
if (layer_idx > 0) {
|
||||||
LayerToPrint &layer = layers_to_print[layer_idx++];
|
LayerToPrint &layer = layers_to_print[layer_idx];
|
||||||
cooling_buffer.apply_smooth_speed(smooth_calculator, layers_extruder_adjustments[layer_idx], layer_idx);
|
cooling_buffer.apply_smooth_speed(smooth_calculator, layers_extruder_adjustments[layer_idx], layer_idx);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -170,6 +170,10 @@ void PrintObject::merge_layer_node(const size_t layer_id, int &max_merged_id, st
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
auto it = node_record.find(appear_id[appear_node_idx]);
|
auto it = node_record.find(appear_id[appear_node_idx]);
|
||||||
|
//protect
|
||||||
|
if (it == node_record.end())
|
||||||
|
continue;
|
||||||
|
|
||||||
std::vector<std::pair<int, int>> &appear_node_pos = it->second;
|
std::vector<std::pair<int, int>> &appear_node_pos = it->second;
|
||||||
|
|
||||||
for (size_t node_idx = 0; node_idx < appear_node_pos.size(); ++node_idx) {
|
for (size_t node_idx = 0; node_idx < appear_node_pos.size(); ++node_idx) {
|
||||||
|
|
Loading…
Reference in New Issue