From 46e8259b999147aafd361ce4b699fb00817129a8 Mon Sep 17 00:00:00 2001 From: bubnikv Date: Fri, 12 May 2017 11:09:24 +0200 Subject: [PATCH] Fixing some missing layers with support material. --- xs/src/libslic3r/SupportMaterial.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xs/src/libslic3r/SupportMaterial.cpp b/xs/src/libslic3r/SupportMaterial.cpp index de2a4bc80..08ffce8b3 100644 --- a/xs/src/libslic3r/SupportMaterial.cpp +++ b/xs/src/libslic3r/SupportMaterial.cpp @@ -1416,14 +1416,14 @@ void PrintObjectSupportMaterial::generate_base_layers( // Find a top_contact layer touching the layer_intermediate from above, if any, and collect its polygons into polygons_new. idx_top_contact_above = idx_lower_or_equal(top_contacts, idx_top_contact_above, - [&layer_intermediate](const MyLayer *layer){ return layer->bottom_z <= layer_intermediate.print_z + EPSILON; }); + [&layer_intermediate](const MyLayer *layer){ return layer->bottom_z <= layer_intermediate.print_z - EPSILON; }); // New polygons for layer_intermediate. Polygons polygons_new; // Use the precomputed layer_support_areas. idx_object_layer_above = std::max(0, idx_lower_or_equal(object.layers, idx_object_layer_above, - [&layer_intermediate](const Layer *layer){ return layer->print_z <= layer_intermediate.print_z - EPSILON; })); + [&layer_intermediate](const Layer *layer){ return layer->print_z <= layer_intermediate.print_z + EPSILON; })); polygons_new = layer_support_areas[idx_object_layer_above]; // Polygons to trim polygons_new.