Fixes gaps created around the 3D honeycomb infill. The bug has been

introduced during the C++ porting of the original Perl code.
This commit is contained in:
bubnikv 2016-10-22 21:31:39 +02:00
parent 67c98eca5f
commit b28d31d0fe

View file

@ -148,7 +148,6 @@ void Fill3DHoneycomb::_fill_surface_single(
{ {
// no rotation is supported for this infill pattern // no rotation is supported for this infill pattern
BoundingBox bb = expolygon.contour.bounding_box(); BoundingBox bb = expolygon.contour.bounding_box();
Point size = bb.size();
coord_t distance = coord_t(scale_(this->spacing) / params.density); coord_t distance = coord_t(scale_(this->spacing) / params.density);
// align bounding box to a multiple of our honeycomb grid module // align bounding box to a multiple of our honeycomb grid module
@ -160,8 +159,8 @@ void Fill3DHoneycomb::_fill_surface_single(
Polylines polylines = makeGrid( Polylines polylines = makeGrid(
scale_(this->z), scale_(this->z),
distance, distance,
ceil(size.x / distance) + 1, ceil(bb.size().x / distance) + 1,
ceil(size.y / distance) + 1, ceil(bb.size().y / distance) + 1,
((this->layer_id/thickness_layers) % 2) + 1); ((this->layer_id/thickness_layers) % 2) + 1);
// move pattern in place // move pattern in place