1) Implemented anchoring of infill lines to perimeters with length

limited anchors, while before a full perimeter segment was always
   taken if possible.
2) Adapted the line infills (grid, stars, triangles, cubic) to 1).
   This also solves a long standing issue of these infills producing
   anchors for each sweep direction independently, thus possibly
   overlapping and overextruding, which was quite detrimental
   in narrow areas.
3) Refactored cubic adaptive infill anchroing algorithm
   for performance and clarity.
This commit is contained in:
Vojtech Bubnik 2020-11-05 17:32:40 +01:00
parent 414fdaefc5
commit 239d588c5d
12 changed files with 1200 additions and 626 deletions

View file

@ -124,7 +124,9 @@ protected:
virtual std::pair<float, Point> _infill_direction(const Surface *surface) const;
public:
static void connect_infill(Polylines &&infill_ordered, const ExPolygon &boundary, Polylines &polylines_out, double spacing, const FillParams &params, const int hook_length = 0);
static void connect_infill(Polylines &&infill_ordered, const ExPolygon &boundary, Polylines &polylines_out, const double spacing, const FillParams &params, const int hook_length = 0);
static void connect_infill(Polylines &&infill_ordered, const Polygons &boundary, const BoundingBox& bbox, Polylines &polylines_out, const double spacing, const FillParams &params, const int hook_length = 0);
static void connect_infill(Polylines &&infill_ordered, const std::vector<const Polygon*> &boundary, const BoundingBox &bbox, Polylines &polylines_out, double spacing, const FillParams &params, const int hook_length = 0);
static coord_t _adjust_solid_spacing(const coord_t width, const coord_t distance);