FIX: fix a prime tower issue in timelapse smooth mode

Fix the issue that the first 2 layers of prime tower are not generated
when timelapse is set to smooth mode. This issue only happens in single
filament printing.

Signed-off-by: yifan.wu <yifan.wu@bambulab.com>
This commit is contained in:
yifan.wu 2022-09-10 17:39:51 +08:00 committed by Lane.Wei
parent cd315d0888
commit 1f38d12862
2 changed files with 9 additions and 10 deletions

View file

@ -562,6 +562,15 @@ void ToolOrdering::fill_wipe_tower_partitions(const PrintConfig &config, coordf_
for (int i = int(m_layer_tools.size()) - 2; i >= 0; -- i)
m_layer_tools[i].wipe_tower_partitions = std::max(m_layer_tools[i + 1].wipe_tower_partitions, m_layer_tools[i].wipe_tower_partitions);
// if enable_timelapse_print(), update all layer_tools parameters: wipe_tower_partitions
if (config.timelapse_type == TimelapseType::tlSmooth) {
for (LayerTools& layer_tools : m_layer_tools) {
if (layer_tools.wipe_tower_partitions == 0) {
layer_tools.wipe_tower_partitions = 1;
}
}
}
//FIXME this is a hack to get the ball rolling.
for (LayerTools &lt : m_layer_tools)
lt.has_wipe_tower = (lt.has_object && lt.wipe_tower_partitions > 0) || lt.print_z < object_bottom_z + EPSILON;