mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-16 03:07:55 -06:00
Optimized Layer::merge_slices()
Don't merge classified pieces of layerm->slices, but use the non-split islands of a layer. For a single region print, these shall be equal. Added Slic3r-console.ico windows icon for the console Slic3r. This is a copy of the big icon, with the big images stripped off.
This commit is contained in:
parent
79f5a16536
commit
ef69474636
4 changed files with 14 additions and 13 deletions
|
@ -129,8 +129,19 @@ Layer::make_slices()
|
|||
void
|
||||
Layer::merge_slices()
|
||||
{
|
||||
FOREACH_LAYERREGION(this, layerm) {
|
||||
(*layerm)->merge_slices();
|
||||
if (this->regions.size() == 1) {
|
||||
// Optimization, also more robust. Don't merge classified pieces of layerm->slices,
|
||||
// but use the non-split islands of a layer. For a single region print, these shall be equal.
|
||||
this->regions.front()->slices.surfaces.clear();
|
||||
surfaces_append(this->regions.front()->slices.surfaces, this->slices.expolygons, stInternal);
|
||||
} else {
|
||||
FOREACH_LAYERREGION(this, layerm) {
|
||||
ExPolygons expp;
|
||||
// without safety offset, artifacts are generated (GH #2494)
|
||||
union_(to_polygons(STDMOVE((*layerm)->slices.surfaces)), &expp, true);
|
||||
(*layerm)->slices.surfaces.clear();
|
||||
surfaces_append((*layerm)->slices.surfaces, expp, stInternal);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue