ENH: make arrangement align better

Jira: STUDIO-2584, STUDIO-2507

Change-Id: I1987103e46f5ecb84395b5885954679ffe105c60
(cherry picked from commit 90df278408b79ad5b8d4ceaf90fe483cd8f5a48c)
This commit is contained in:
manch1n 2023-03-29 09:43:17 +08:00 committed by Lane.Wei
parent 1e731a15f0
commit 62a2fadeb8
2 changed files with 65 additions and 13 deletions

View file

@ -85,7 +85,7 @@ const double BIG_ITEM_TRESHOLD = 0.02;
template<class PConf>
void fill_config(PConf& pcfg, const ArrangeParams &params) {
if (params.is_seq_print || params.excluded_regions.empty()==false) {
if (params.is_seq_print) {
// Align the arranged pile into the center of the bin
pcfg.alignment = PConf::Alignment::CENTER;
// Start placing the items from the center of the print bed
@ -95,7 +95,7 @@ void fill_config(PConf& pcfg, const ArrangeParams &params) {
// Align the arranged pile into the center of the bin
pcfg.alignment = PConf::Alignment::CENTER;
// Start placing the items from the center of the print bed
pcfg.starting_point = PConf::Alignment::CENTER;
pcfg.starting_point = PConf::Alignment::TOP_RIGHT;
}
// Try 4 angles (45 degree step) and find the one with min cost