Fixed an issue where the wipe tower did not account for z_offset, especially when "No sparse layers" is enabled. (#11833)

# Description

This PR addresses the issue that WipeTower's start z position didn't consider the z_offset.

fixes #11611

# Screenshots/Recordings/Graphs

<!--
> Please attach relevant screenshots to showcase the UI changes.
> Please attach images that can help explain the changes.
-->

## Tests

<!--
> Please describe the tests that you have conducted to verify the changes made in this PR.
-->
This commit is contained in:
SoftFever
2026-01-05 20:33:13 +08:00
committed by GitHub
parent ef876fe577
commit 044a1d5ba4

View File

@@ -97,7 +97,8 @@ public:
m_enable_timelapse_print(print_config.timelapse_type.value == TimelapseType::tlSmooth),
m_enable_wrapping_detection(print_config.enable_wrapping_detection && (print_config.wrapping_exclude_area.values.size() > 2) && (slice_used_filaments.size() <= 1)),
m_is_first_print(true),
m_print_config(&print_config)
m_print_config(&print_config),
m_last_wipe_tower_print_z(print_config.z_offset.value)
{
// initialize with the extruder offset of master extruder id
m_extruder_offsets.resize(print_config.filament_map.size(), print_config.extruder_offset.get_at(print_config.master_extruder_id.value - 1));
@@ -143,7 +144,7 @@ private:
// Current layer index.
int m_layer_idx;
int m_tool_change_idx;
double m_last_wipe_tower_print_z = 0.f;
double m_last_wipe_tower_print_z;
// BBS
Vec3d m_plate_origin;