mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-12 21:39:02 +08:00
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.
This commit is contained in:
parent
bfb336df0c
commit
e9e55e7ac3
@ -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 - INFILL_OVERLAP_OVER_SPACING) * this->spacing),
|
||||||
scale_(- 0.5 * this->spacing));
|
scale_(- 0.5 * this->spacing));
|
||||||
if (poly_with_offset.n_contours_inner == 0) {
|
if (poly_with_offset.n_contours_inner == 0) {
|
||||||
|
// Not a single infill line fits.
|
||||||
//FIXME maybe one shall trigger the gap fill here?
|
//FIXME maybe one shall trigger the gap fill here?
|
||||||
return true;
|
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
|
// define flow spacing according to requested density
|
||||||
bool full_infill = params.density > 0.9999f;
|
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.
|
// 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;
|
coord_t x0 = bounding_box.min.x + line_spacing / 2;
|
||||||
|
|
||||||
#ifdef SLIC3R_DEBUG
|
#ifdef SLIC3R_DEBUG
|
||||||
|
Loading…
x
Reference in New Issue
Block a user