Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbubnikv <bubnikv@gmail.com>2016-11-20 14:38:59 +0300
committerbubnikv <bubnikv@gmail.com>2016-11-20 14:38:59 +0300
commitef69474636e1a05b5039738d9e53f5971917856a (patch)
tree4e1c6023fd813138b4daf680390f07e94d8aeb09 /xs/src/libslic3r/Layer.cpp
parent79f5a16536150bf045a1327f5ab5c3c9d58f4390 (diff)
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.
Diffstat (limited to 'xs/src/libslic3r/Layer.cpp')
-rw-r--r--xs/src/libslic3r/Layer.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/xs/src/libslic3r/Layer.cpp b/xs/src/libslic3r/Layer.cpp
index 492eb8be4..d3399d46e 100644
--- a/xs/src/libslic3r/Layer.cpp
+++ b/xs/src/libslic3r/Layer.cpp
@@ -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);
+ }
}
}