Skip to content

Commit

Permalink
ENH: auto-arrange handles 4*4 alignment better
Browse files Browse the repository at this point in the history
I improve the cost function to align big item better.

JIRA: https://jira.bambooolab.com/browse/STUDIO-1221

Change-Id: Id5a16c127ec51bf7463e331058cb1a8f78b764ca
(cherry picked from commit 39773a901df82081c7d9d089807a52aa09e6a498)
  • Loading branch information
miaoxin authored and lanewei120 committed Dec 15, 2022
1 parent 6bc5809 commit 12206e5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/libslic3r/Arrange.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -356,9 +356,10 @@ class AutoArranger {
score = dist_for_BOTTOM_LEFT(ibb, origin_pack);
}
else {
score = 0.5 * norm(pl::distance(ibb.center(), origin_pack));
if (m_pilebb.defined)
score += 0.5 * norm(pl::distance(ibb.center(), m_pilebb.center()));
score = 0.5 * norm(pl::distance(ibb.center(), m_pilebb.center()));
else
score = 0.5 * norm(pl::distance(ibb.center(), origin_pack));
}
break;
}
Expand Down

0 comments on commit 12206e5

Please sign in to comment.