mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-16 16:05:54 +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 "../ClipperUtils.hpp"
|
||||||
#include "../ExPolygon.hpp"
|
#include "../ExPolygon.hpp"
|
||||||
#include "../PolylineCollection.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.
|
// We ignore this->bounding_box because it doesn't matter; we're doing align_to_grid below.
|
||||||
BoundingBox bounding_box = expolygon.contour.bounding_box();
|
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
|
// Due to integer rounding, rotated polygons might not preserve verticality
|
||||||
// (i.e. when rotating by PI/2 two points having the same x coordinate
|
// (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.
|
// they might get different y coordinates), thus the first line will be skipped.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user