mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-06 06:08:44 +08:00
Fixed regression: rectilinear infill crashed with zero-area polygons. #3648
This commit is contained in:
parent
7355d39584
commit
fc7e022003
@ -1,3 +1,4 @@
|
||||
#undef NDEBUG
|
||||
#include "../ClipperUtils.hpp"
|
||||
#include "../ExPolygon.hpp"
|
||||
#include "../PolylineCollection.hpp"
|
||||
@ -28,6 +29,9 @@ FillRectilinear::_fill_single_direction(ExPolygon expolygon,
|
||||
// We ignore this->bounding_box because it doesn't matter; we're doing align_to_grid below.
|
||||
BoundingBox bounding_box = expolygon.contour.bounding_box();
|
||||
|
||||
// Ignore too small expolygons.
|
||||
if (bounding_box.size().x < min_spacing) return;
|
||||
|
||||
// Due to integer rounding, rotated polygons might not preserve verticality
|
||||
// (i.e. when rotating by PI/2 two points having the same x coordinate
|
||||
// they might get different y coordinates), thus the first line will be skipped.
|
||||
|
Loading…
x
Reference in New Issue
Block a user