mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-06-03 02:22:46 +00: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:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user