FIX: the wipe tower out of bounds prompt is incorrect when there are multiple plates,

jira: STUDIO-11817
Change-Id: Ie0b9ac36d568f6d4d6cd134056e4d850612c1961
(cherry picked from commit 5f624b72484a3ddf15318e4e0fcbdc41b98b3a85)
This commit is contained in:
zhimin.zeng
2025-05-23 17:02:36 +08:00
committed by Noisyfox
parent 1b10eba98b
commit aca0f883f7
3 changed files with 8 additions and 5 deletions

View File

@@ -1070,10 +1070,13 @@ void GLVolumeCollection::render(GLVolumeCollection::ERenderType type,
glsafe(::glDisable(GL_BLEND));
}
bool GLVolumeCollection::check_wipe_tower_outside_state(const Slic3r::BuildVolume &build_volume) const
bool GLVolumeCollection::check_wipe_tower_outside_state(const Slic3r::BuildVolume &build_volume, int plate_id) const
{
for (GLVolume *volume : this->volumes) {
if (volume->is_wipe_tower) {
int wipe_tower_plate_id = volume->composite_id.object_id - 1000;
if (wipe_tower_plate_id != plate_id)
continue;
const std::vector<Vec2d>& printable_area = build_volume.printable_area();
Polygon printable_poly = Polygon::new_scale(printable_area);