mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-07 23:17:35 -06:00
FIX: avoid wipe tower conflict with objects
Use a more accurate way to estimate wipe tower: 1. read wipe configure from front-end (the positions may be different at different plates). 2. when depth is unavailable, use all materials to estimate depth (the estimated wipe tower may be larger than the actual generated one). Change-Id: I42ffd03d9817b57f5023a6820cda0032509c6fe5 (cherry picked from commit 77ba9757023afb9160c996eeea6ead8a27b50ce4)
This commit is contained in:
parent
67d95d3fc8
commit
dd473bdc3f
6 changed files with 71 additions and 35 deletions
|
@ -545,11 +545,11 @@ public:
|
|||
|
||||
auto binbb = sl::boundingBox(m_bin);
|
||||
// BBS: excluded region (virtual object but not wipe tower) should not affect final alignment
|
||||
bool all_is_excluded_region = std::all_of(items.begin(), items.end(), [](Item &itm) { return itm.is_virt_object && !itm.is_wipe_tower; });
|
||||
if (!all_is_excluded_region)
|
||||
cfg.alignment = PConfig::Alignment::DONT_ALIGN;
|
||||
else
|
||||
cfg.alignment = PConfig::Alignment::CENTER;
|
||||
//bool all_is_excluded_region = std::all_of(items.begin(), items.end(), [](Item &itm) { return itm.is_virt_object && !itm.is_wipe_tower; });
|
||||
//if (!all_is_excluded_region)
|
||||
// cfg.alignment = PConfig::Alignment::DONT_ALIGN;
|
||||
//else
|
||||
// cfg.alignment = PConfig::Alignment::CENTER;
|
||||
|
||||
auto starting_point = cfg.starting_point == PConfig::Alignment::BOTTOM_LEFT ? binbb.minCorner() : binbb.center();
|
||||
// if we have wipe tower, items should be arranged around wipe tower
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue