Fixing the infill order for concentric infill to outside-in.

Relies to:
Concentric Fill Start Point - New Feature Request #4948
Feature Request: Archimedean Chords - Option to define direction of travel (Inside-Out or Outside-In) #5214
This commit is contained in:
Vojtech Bubnik 2021-01-06 11:05:22 +01:00
parent 746729e4fa
commit 3c9f3d2b66
5 changed files with 21 additions and 36 deletions

View file

@ -1851,10 +1851,7 @@ void Print::_make_brim()
}
polygons_append(loops, offset(islands, -0.5f * float(flow.scaled_spacing())));
}
loops = union_pt_chained(loops, false);
// The function above produces ordering well suited for concentric infill (from outside to inside).
// For Brim, the ordering should be reversed (from inside to outside).
std::reverse(loops.begin(), loops.end());
loops = union_pt_chained_outside_in(loops, false);
// If there is a possibility that brim intersects skirt, go through loops and split those extrusions
// The result is either the original Polygon or a list of Polylines