mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-07-26 16:12:02 +08:00
Safety check for firstfit for larger objects than the print bed.
This commit is contained in:
parent
86ba75d692
commit
50424e33c6
@ -55,6 +55,18 @@ public:
|
|||||||
this->progress_(--total);
|
this->progress_(--total);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Safety test: try to pack each item into an empty bin. If it fails
|
||||||
|
// then it should be removed from the not_packed list
|
||||||
|
{ auto it = store_.begin();
|
||||||
|
while (it != store_.end()) {
|
||||||
|
Placer p(bin);
|
||||||
|
if(!p.pack(*it)) {
|
||||||
|
auto itmp = it++;
|
||||||
|
store_.erase(itmp);
|
||||||
|
} else it++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for(auto& item : store_ ) {
|
for(auto& item : store_ ) {
|
||||||
bool was_packed = false;
|
bool was_packed = false;
|
||||||
while(!was_packed) {
|
while(!was_packed) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user