Fix wipe tower skirt alignment by computing bbx from actual first-layer polygon (#12457)

This commit is contained in:
SoftFever
2026-02-25 12:37:05 +08:00
committed by GitHub
parent ce56ad5590
commit db1fe73e85
2 changed files with 11 additions and 4 deletions

View File

@@ -2134,6 +2134,11 @@ WipeTower::ToolChangeResult WipeTower2::finish_layer()
// Save actual brim width to be later passed to the Print object, which will use it
// for skirt calculation and pass it to GLCanvas for precise preview box
m_wipe_tower_brim_width_real = loops_num * spacing;
// Compute actual first-layer bounding box from the outermost brim polygon,
// matching how WipeTower::get_bbx() uses m_outer_wall extents.
BoundingBox first_layer_box = get_extents(poly);
m_first_layer_bbx = BoundingBoxf(unscale(first_layer_box.min), unscale(first_layer_box.max));
}
// Now prepare future wipe.