Fix for SPE-421 and emergency fix for SPE-422 (needs further investigation)
This commit is contained in:
parent
170034dd15
commit
629108265b
2 changed files with 3 additions and 4 deletions
|
@ -61,8 +61,7 @@ public:
|
||||||
while (it != store_.end()) {
|
while (it != store_.end()) {
|
||||||
Placer p(bin);
|
Placer p(bin);
|
||||||
if(!p.pack(*it)) {
|
if(!p.pack(*it)) {
|
||||||
auto itmp = it++;
|
it = store_.erase(it);
|
||||||
store_.erase(itmp);
|
|
||||||
} else it++;
|
} else it++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -549,7 +549,7 @@ bool arrange(Model &model, coordf_t dist, const Slic3r::BoundingBoxf* bb,
|
||||||
auto& sh = pile.back();
|
auto& sh = pile.back();
|
||||||
|
|
||||||
// We retrieve the reference point of this item
|
// We retrieve the reference point of this item
|
||||||
auto rv = Nfp::referenceVertex(sh);
|
auto rv = ShapeLike::boundingBox(sh).center();
|
||||||
|
|
||||||
// We get the distance of the reference point from the center of the
|
// We get the distance of the reference point from the center of the
|
||||||
// heat bed
|
// heat bed
|
||||||
|
@ -558,7 +558,7 @@ bool arrange(Model &model, coordf_t dist, const Slic3r::BoundingBoxf* bb,
|
||||||
|
|
||||||
// The score will be the normalized distance which will be minimized,
|
// The score will be the normalized distance which will be minimized,
|
||||||
// effectively creating a circle shaped pile of items
|
// effectively creating a circle shaped pile of items
|
||||||
double score = double(d)/norm;
|
double score = d/norm;
|
||||||
|
|
||||||
// If it does not fit into the print bed we will beat it
|
// If it does not fit into the print bed we will beat it
|
||||||
// with a large penality. If we would not do this, there would be only
|
// with a large penality. If we would not do this, there would be only
|
||||||
|
|
Loading…
Reference in a new issue