mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-09 10:16:50 +00:00
ENH: improve auto arranging's wipe tower logic
1. If there is already a wipe tower on current plate, leave it there regardless need_wipe_tower flag. This is useful when we have toolchange custom gcodes. 2. Correct wipe tower pos to prevent it outside bed. Jira: STUDIO-4426 Change-Id: Iedecc7c5fe7ced01533d0a302253841046a7fb42 (cherry picked from commit e8d728e46b12baaf9fb0e87e3d14197ae3616826)
This commit is contained in:
@@ -4910,6 +4910,12 @@ GLCanvas3D::WipeTowerInfo GLCanvas3D::get_wipe_tower_info(int plate_idx) const
|
||||
float brim_width = wxGetApp().preset_bundle->prints.get_edited_preset().config.opt_float("prime_tower_brim_width");
|
||||
wti.m_bb.offset((brim_width));
|
||||
|
||||
// BBS: the wipe tower pos might be outside bed
|
||||
PartPlate* plate = wxGetApp().plater()->get_partplate_list().get_curr_plate();
|
||||
BoundingBoxf3 build_volume = plate->get_build_volume();
|
||||
wti.m_pos.x() = std::clamp(wti.m_pos.x(), 0.0, build_volume.max.x() - wti.m_bb.size().x());
|
||||
wti.m_pos.y() = std::clamp(wti.m_pos.y(), 0.0, build_volume.max.y() - wti.m_bb.size().y());
|
||||
|
||||
// BBS: add partplate logic
|
||||
wti.m_plate_idx = plate_idx;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user