From b28d31d0fedf4413018ce722e5336030ed7dde80 Mon Sep 17 00:00:00 2001 From: bubnikv Date: Sat, 22 Oct 2016 21:31:39 +0200 Subject: [PATCH] Fixes gaps created around the 3D honeycomb infill. The bug has been introduced during the C++ porting of the original Perl code. --- xs/src/libslic3r/Fill/Fill3DHoneycomb.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/xs/src/libslic3r/Fill/Fill3DHoneycomb.cpp b/xs/src/libslic3r/Fill/Fill3DHoneycomb.cpp index a4b8b53c57..c37328c69a 100644 --- a/xs/src/libslic3r/Fill/Fill3DHoneycomb.cpp +++ b/xs/src/libslic3r/Fill/Fill3DHoneycomb.cpp @@ -148,7 +148,6 @@ void Fill3DHoneycomb::_fill_surface_single( { // no rotation is supported for this infill pattern BoundingBox bb = expolygon.contour.bounding_box(); - Point size = bb.size(); coord_t distance = coord_t(scale_(this->spacing) / params.density); // align bounding box to a multiple of our honeycomb grid module @@ -157,11 +156,11 @@ void Fill3DHoneycomb::_fill_surface_single( bb.merge(_align_to_grid(bb.min, Point(2*distance, 2*distance))); // generate pattern - Polylines polylines = makeGrid( + Polylines polylines = makeGrid( scale_(this->z), distance, - ceil(size.x / distance) + 1, - ceil(size.y / distance) + 1, + ceil(bb.size().x / distance) + 1, + ceil(bb.size().y / distance) + 1, ((this->layer_id/thickness_layers) % 2) + 1); // move pattern in place