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

github.com/supermerill/SuperSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbubnikv <bubnikv@gmail.com>2017-12-14 15:26:44 +0300
committerbubnikv <bubnikv@gmail.com>2017-12-14 15:26:44 +0300
commitd65835f89b2d7138e5225bc1ddb4931f09ad4f73 (patch)
tree294a2bee0ccac5dc3091f548ceedb72169ee8049 /xs/src/libslic3r
parenteaaac8b2a4161148b0bbb4267bc866a0d80ab8e1 (diff)
Improvement of region classification numerical stability.
The Clipper library is not stable when calcuating offsets of contours with holes. Replaced a single call of offset2 with offset_ex(offset_ex()). This is not the most efficient solution, but it fixes this problem. Fixes https://github.com/prusa3d/Slic3r/issues/456
Diffstat (limited to 'xs/src/libslic3r')
-rw-r--r--xs/src/libslic3r/PrintObject.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/xs/src/libslic3r/PrintObject.cpp b/xs/src/libslic3r/PrintObject.cpp
index fc2979c20..c61fc102b 100644
--- a/xs/src/libslic3r/PrintObject.cpp
+++ b/xs/src/libslic3r/PrintObject.cpp
@@ -447,7 +447,8 @@ void PrintObject::detect_surfaces_type()
to_polygons(upper_layer->get_region(idx_region)->slices.surfaces) :
to_polygons(upper_layer->slices);
surfaces_append(top,
- offset2_ex(diff(layerm_slices_surfaces, upper_slices, true), -offset, offset),
+ //FIXME implement offset2_ex working over ExPolygons, that should be a bit more efficient than calling offset_ex twice.
+ offset_ex(offset_ex(diff_ex(layerm_slices_surfaces, upper_slices, true), -offset), offset),
stTop);
} else {
// if no upper layer, all surfaces of this one are solid