Revert "Fix wipe tower placed outside bed boundary on first slice (#12777)"

This reverts commit 494601eea5, reversing
changes made to d28e964e04.
This commit is contained in:
SoftFever
2026-03-17 19:14:50 +08:00
parent c224b3f94b
commit c8070b67d5
2 changed files with 1 additions and 22 deletions

View File

@@ -4074,13 +4074,6 @@ void PartPlateList::set_default_wipe_tower_pos_for_plate(int plate_idx)
wt_x_opt = ConfigOptionFloat(I3_WIPE_TOWER_DEFAULT_X_POS);
wt_y_opt = ConfigOptionFloat(I3_WIPE_TOWER_DEFAULT_Y_POS);
}
// Clamp default position to fit within the actual plate dimensions so the wipe tower
// doesn't start outside the bed for printers smaller than the hardcoded defaults.
const double wt_default_margin = 2.;
const double wt_estimated_width = 60.; // conservative estimate matching prime_tower_width default
const double wt_estimated_depth = 20.; // conservative depth estimate
wt_x_opt.value = std::max(wt_default_margin, std::min(wt_x_opt.value, m_plate_width - wt_estimated_width - wt_default_margin));
wt_y_opt.value = std::max(wt_default_margin, std::min(wt_y_opt.value, m_plate_depth - wt_estimated_depth - wt_default_margin));
dynamic_cast<ConfigOptionFloats *>(proj_cfg.option("wipe_tower_x"))->set_at(&wt_x_opt, plate_idx, 0);
dynamic_cast<ConfigOptionFloats *>(proj_cfg.option("wipe_tower_y"))->set_at(&wt_y_opt, plate_idx, 0);
}