Fix crash when slicing multi-material print with wipe tower (#12682)

The WipeTower2 code path never called construct_mesh(), leaving
wipe_tower_mesh_data as std::nullopt. GCode export then dereferenced
it unconditionally, triggering an assertion failure / crash.
This commit is contained in:
SoftFever
2026-03-09 13:31:11 +08:00
committed by GitHub
parent 4f8097f7f7
commit eb6da907a9
4 changed files with 9 additions and 1 deletions

View File

@@ -72,6 +72,8 @@ public:
// WT2 doesn't currently compute a rib-origin compensation like WipeTower (m_rib_offset),
// so expose a zero offset for consistency purposes (to maintain API parity).
Vec2f get_rib_offset() const { return Vec2f::Zero(); }
float get_rib_width() const { return m_rib_width; }
float get_rib_length() const { return m_rib_length; }
// Switch to a next layer.
void set_layer(