FIX: fix bug when enable timelapse

1. the error start position after filament change
2. the error wall depth print with tpu
jira: none

Change-Id: I26d4e1c5c5c3bcae14555f9a875485435cdd6b97
This commit is contained in:
zhimin.zeng 2025-01-09 16:44:21 +08:00 committed by lane.wei
parent f4bcbfaf4a
commit 753e2ac708
1 changed files with 4 additions and 3 deletions

View File

@ -3092,10 +3092,11 @@ void WipeTower::generate_new(std::vector<std::vector<WipeTower::ToolChangeResult
if (layer_result.empty()) {
// there is nothing to merge finish_layer with
layer_result.emplace_back(std::move(finish_layer_tcr));
} else {
}
else if (is_valid_gcode(finish_layer_tcr.gcode)) {
if (insert_finish_layer_idx == -1)
layer_result[0] = merge_tcr(finish_layer_tcr, layer_result[0]);
else if (is_valid_gcode(finish_layer_tcr.gcode))
else
layer_result[insert_finish_layer_idx] = merge_tcr(layer_result[insert_finish_layer_idx], finish_layer_tcr);
}
@ -3244,7 +3245,7 @@ WipeTower::ToolChangeResult WipeTower::only_generate_out_wall(bool is_new_mode)
float wipe_tower_depth = m_layer_info->depth + m_perimeter_width;
if (is_new_mode && m_enable_timelapse_print)
wipe_tower_depth = m_wipe_tower_width;
wipe_tower_depth = m_wipe_tower_depth;
box_coordinates wt_box(Vec2f(0.f, (m_current_shape == SHAPE_REVERSED ? m_layer_info->toolchanges_depth() : 0.f)), m_wipe_tower_width, wipe_tower_depth);
wt_box = align_perimeter(wt_box);
if (m_use_gap_wall)