From c84bc713614353e3f10658c7d9d87a743a9ca19a Mon Sep 17 00:00:00 2001 From: Joseph Lenox Date: Sat, 2 Sep 2017 23:01:43 -0500 Subject: [PATCH] Regression: Check on absolute value of xy_size_compensation instead of raw value > 0 to permit negative offsets again. Fixes #4101 --- xs/src/libslic3r/PrintObject.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xs/src/libslic3r/PrintObject.cpp b/xs/src/libslic3r/PrintObject.cpp index ed434d48c..0c72d7638 100644 --- a/xs/src/libslic3r/PrintObject.cpp +++ b/xs/src/libslic3r/PrintObject.cpp @@ -742,7 +742,7 @@ void PrintObject::_slice() // Apply size compensation and perform clipping of multi-part objects. const coord_t xy_size_compensation = scale_(this->config.xy_size_compensation.value); for (Layer* layer : this->layers) { - if (xy_size_compensation > 0) { + if (abs(xy_size_compensation) > 0) { if (layer->regions.size() == 1) { // Single region, growing or shrinking. LayerRegion* layerm = layer->regions.front(); @@ -758,7 +758,7 @@ void PrintObject::_slice() LayerRegion* layerm = layer->regions[region_id]; Polygons slices = layerm->slices; - if (xy_size_compensation > 0) + if (abs(xy_size_compensation) > 0) slices = offset(slices, xy_size_compensation); if (region_id > 0)