From 5d82c1601b8897b9113e428bf6b36eaaabd2a101 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Hejl?= Date: Thu, 9 Jun 2022 14:25:06 +0200 Subject: [PATCH] Fixed an unintentional transformation of ExPolygon to a single vector containing all points from contour and all holes in the Lightning infill. This was causing most of the issues with randomly generated infill hanging in the air without any support. --- src/libslic3r/Fill/Lightning/Generator.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libslic3r/Fill/Lightning/Generator.cpp b/src/libslic3r/Fill/Lightning/Generator.cpp index 4aba7202d..75ca5583e 100644 --- a/src/libslic3r/Fill/Lightning/Generator.cpp +++ b/src/libslic3r/Fill/Lightning/Generator.cpp @@ -62,7 +62,7 @@ void Generator::generateInitialInternalOverhangs(const PrintObject &print_object for (const LayerRegion* layerm : print_object.get_layer(layer_nr)->regions()) for (const Surface& surface : layerm->fill_surfaces.surfaces) if (surface.surface_type == stInternal || surface.surface_type == stInternalVoid) - infill_area_here.emplace_back(surface.expolygon); + append(infill_area_here, to_polygons(surface.expolygon)); //Remove the part of the infill area that is already supported by the walls. Polygons overhang = diff(offset(infill_area_here, -float(m_wall_supporting_radius)), infill_area_above); @@ -90,7 +90,7 @@ void Generator::generateTrees(const PrintObject &print_object, const std::functi for (const LayerRegion *layerm : print_object.get_layer(layer_id)->regions()) for (const Surface &surface : layerm->fill_surfaces.surfaces) if (surface.surface_type == stInternal || surface.surface_type == stInternalVoid) - infill_outlines[layer_id].emplace_back(surface.expolygon); + append(infill_outlines[layer_id], to_polygons(surface.expolygon)); } // For various operations its beneficial to quickly locate nearby features on the polygon: