From c6e117fef0efbc0f921db961c1cbf68b895bf75a Mon Sep 17 00:00:00 2001 From: "zhimin.zeng" Date: Sat, 21 Dec 2024 19:54:32 +0800 Subject: [PATCH] FIX: the wipe tower is not show when enable smooth timelapse jira:none Change-Id: Iab7994e1ba15d09effe9ad57aebbe9520459f7cd --- src/libslic3r/GCode/WipeTower.cpp | 12 ++++++++++-- src/libslic3r/GCode/WipeTower.hpp | 2 +- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/libslic3r/GCode/WipeTower.cpp b/src/libslic3r/GCode/WipeTower.cpp index 32aa2c9fc..017b6916e 100644 --- a/src/libslic3r/GCode/WipeTower.cpp +++ b/src/libslic3r/GCode/WipeTower.cpp @@ -2466,7 +2466,7 @@ void WipeTower::reset_block_status() } } -void WipeTower::update_start_depth_for_blocks() +void WipeTower::update_all_layer_depth(float wipe_tower_depth) { m_wipe_tower_depth = 0.f; float start_offset = m_perimeter_width; @@ -2487,6 +2487,14 @@ void WipeTower::update_start_depth_for_blocks() } if (m_wipe_tower_depth > 0) m_wipe_tower_depth += start_offset; + + if (m_enable_timelapse_print) { + if (is_approx(m_wipe_tower_depth, 0.f)) + m_wipe_tower_depth = wipe_tower_depth; + for (WipeTowerInfo &plan_info : m_plan) { + plan_info.depth = m_wipe_tower_depth; + } + } } void WipeTower::generate_wipe_tower_blocks() @@ -2628,7 +2636,7 @@ void WipeTower::plan_tower_new() } } - update_start_depth_for_blocks(); + update_all_layer_depth(max_depth); } int WipeTower::get_wall_filament_for_all_layer() diff --git a/src/libslic3r/GCode/WipeTower.hpp b/src/libslic3r/GCode/WipeTower.hpp index b153e0b1e..3937b6388 100644 --- a/src/libslic3r/GCode/WipeTower.hpp +++ b/src/libslic3r/GCode/WipeTower.hpp @@ -336,7 +336,7 @@ public: void plan_tower_new(); void generate_wipe_tower_blocks(); - void update_start_depth_for_blocks(); + void update_all_layer_depth(float wipe_tower_depth); ToolChangeResult tool_change_new(size_t new_tool); NozzleChangeResult nozzle_change_new(int old_filament_id, int new_filament_id);