ENH: improve auto arranging and by-object printing

1. In auto arranging bed temp can be higher than vitrify temp by no more than 15 degrees.
2. In by-object printing we use max radius for clearance
3. Add P1P max radius

Change-Id: If595f3e19fd74f6f36d2f394edbb835c413cc800
(cherry picked from commit 2af42420ad3770f0728adb583082600544519a58)
This commit is contained in:
Arthur 2022-12-20 18:32:13 +08:00 committed by Lane.Wei
parent 400ce3bcfd
commit 7596b3fed9
4 changed files with 6 additions and 4 deletions

View file

@ -78,6 +78,7 @@ using ItemGroup = std::vector<std::reference_wrapper<Item>>;
// A coefficient used in separating bigger items and smaller items.
const double BIG_ITEM_TRESHOLD = 0.02;
#define VITRIFY_TEMP_DIFF_THRSH 15 // bed temp can be higher than vitrify temp, but not higher than this thresh
// Fill in the placer algorithm configuration with values carefully chosen for
// Slic3r.
@ -423,9 +424,9 @@ protected:
for (int i = 0; i < m_items.size(); i++) {
Item& p = m_items[i];
if (p.is_virt_object) continue;
score += lambda3 * (item.bed_temp - p.vitrify_temp > 0);
score += lambda3 * (item.bed_temp - p.vitrify_temp > VITRIFY_TEMP_DIFF_THRSH);
}
score += lambda3 * (item.bed_temp - item.vitrify_temp > 0);
score += lambda3 * (item.bed_temp - item.vitrify_temp > VITRIFY_TEMP_DIFF_THRSH);
score += lambda4 * hasRowHeightConflict + lambda4 * hasLidHeightConflict;
}
else {