mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-11-27 14:36:34 +01:00
Merge remote-tracking branch 'origin/master' into feature_arrange_with_libnest2d
This commit is contained in:
commit
4e901a9db7
39 files changed
+5598
-3029
No files matched your search
@@ -611,14 +611,13 @@ bool arrange(Model &model, coordf_t dist, const Slic3r::BoundingBoxf* bb,
|
||||
// The score is a weighted sum of the distance from pile center
|
||||
// and the pile size
|
||||
score = GRAVITY_RATIO * dist + DENSITY_RATIO * density;
|
||||
std::cout << "big " << std::endl;
|
||||
|
||||
} else if(itemnormarea < BIG_ITEM_TRESHOLD && bigs.empty()) {
|
||||
// If there are no big items, only small, we should consider the
|
||||
// density here as well to not get silly results
|
||||
auto bindist = pl::distance(ibb.center(), bin.center()) / norm;
|
||||
auto density = std::sqrt(fullbb.width()*fullbb.height()) / norm;
|
||||
score = GRAVITY_RATIO* bindist + DENSITY_RATIO * density;
|
||||
score = GRAVITY_RATIO * bindist + DENSITY_RATIO * density;
|
||||
} else {
|
||||
// Here there are the small items that should be placed around the
|
||||
// already processed bigger items.
|
||||
|
||||
Reference in new issue
Block a user