diff --git a/xs/src/libslic3r/Fill/FillRectilinear.cpp b/xs/src/libslic3r/Fill/FillRectilinear.cpp index 2d3c84eb0..c74da2877 100644 --- a/xs/src/libslic3r/Fill/FillRectilinear.cpp +++ b/xs/src/libslic3r/Fill/FillRectilinear.cpp @@ -63,6 +63,27 @@ FillRectilinear::_fill_single_direction(ExPolygon expolygon, // Whenever between two intersection points we find vertices of the original polygon, // store them in the 'skipped' member of the latter point. + struct IntersectionPoint : Point { + enum ipType { ipTypeLower, ipTypeUpper, ipTypeMiddle }; + ipType type; + + // skipped contains the polygon points accumulated between the previous intersection + // point and the current one, in the original polygon winding order (does not contain + // either points) + Points skipped; + + // next contains a polygon portion connecting this point to the first intersection + // point found following the polygon in any direction but having: + // x > this->x || (x == this->x && y > this->y) + // (it doesn't contain *this but it contains the target intersection point) + Points next; + + IntersectionPoint() : Point() {}; + IntersectionPoint(coord_t x, coord_t y, ipType _type) : Point(x,y), type(_type) {}; + }; + typedef std::map vertical_t; // + typedef std::map grid_t; // > + grid_t grid; { const Polygons polygons = expolygon; diff --git a/xs/src/libslic3r/Fill/FillRectilinear.hpp b/xs/src/libslic3r/Fill/FillRectilinear.hpp index d5d5b8ecf..11e3ec4a6 100644 --- a/xs/src/libslic3r/Fill/FillRectilinear.hpp +++ b/xs/src/libslic3r/Fill/FillRectilinear.hpp @@ -23,27 +23,6 @@ protected: void _fill_single_direction(ExPolygon expolygon, const direction_t &direction, coord_t x_shift, Polylines* out); - - struct IntersectionPoint : Point { - enum ipType { ipTypeLower, ipTypeUpper, ipTypeMiddle }; - ipType type; - - // skipped contains the polygon points accumulated between the previous intersection - // point and the current one, in the original polygon winding order (does not contain - // either points) - Points skipped; - - // next contains a polygon portion connecting this point to the first intersection - // point found following the polygon in any direction but having: - // x > this->x || (x == this->x && y > this->y) - // (it doesn't contain *this but it contains the target intersection point) - Points next; - - IntersectionPoint() : Point() {}; - IntersectionPoint(coord_t x, coord_t y, ipType _type) : Point(x,y), type(_type) {}; - }; - typedef std::map vertical_t; // - typedef std::map grid_t; // > }; class FillAlignedRectilinear : public FillRectilinear