diff options
author | bubnikv <bubnikv@gmail.com> | 2016-11-06 18:03:13 +0300 |
---|---|---|
committer | bubnikv <bubnikv@gmail.com> | 2016-11-06 18:03:13 +0300 |
commit | e9e55e7ac31244583413e6a61876df3946ad412d (patch) | |
tree | 21671829d53509d254c84b4e0fd69556f6812d78 /xs/src/libslic3r/Fill | |
parent | bfb336df0cb1d0f2428bb6158df586733b32a84b (diff) |
Fix missing cubic infill line, thanks @KoKuToru for pointing out the problem
and proposing a fix.
https://github.com/prusa3d/Slic3r/pull/18
Fixed a slight bug, where the infill did not take the complete area.
Diffstat (limited to 'xs/src/libslic3r/Fill')
-rw-r--r-- | xs/src/libslic3r/Fill/FillRectilinear2.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/xs/src/libslic3r/Fill/FillRectilinear2.cpp b/xs/src/libslic3r/Fill/FillRectilinear2.cpp index 420480b5d..3d32f164e 100644 --- a/xs/src/libslic3r/Fill/FillRectilinear2.cpp +++ b/xs/src/libslic3r/Fill/FillRectilinear2.cpp @@ -798,11 +798,12 @@ bool FillRectilinear2::fill_surface_by_lines(const Surface *surface, const FillP scale_(- (0.5 - INFILL_OVERLAP_OVER_SPACING) * this->spacing), scale_(- 0.5 * this->spacing)); if (poly_with_offset.n_contours_inner == 0) { + // Not a single infill line fits. //FIXME maybe one shall trigger the gap fill here? return true; } - BoundingBox bounding_box = poly_with_offset.bounding_box_outer(); + BoundingBox bounding_box = poly_with_offset.bounding_box_src(); // define flow spacing according to requested density bool full_infill = params.density > 0.9999f; @@ -823,7 +824,8 @@ bool FillRectilinear2::fill_surface_by_lines(const Surface *surface, const FillP } // Intersect a set of euqally spaced vertical lines wiht expolygon. - size_t n_vlines = (bounding_box.max.x - bounding_box.min.x + SCALED_EPSILON) / line_spacing; + // n_vlines = ceil(bbox_width / line_spacing) + size_t n_vlines = (bounding_box.max.x - bounding_box.min.x + line_spacing - 1) / line_spacing; coord_t x0 = bounding_box.min.x + line_spacing / 2; #ifdef SLIC3R_DEBUG |