Skip to content

Commit

Permalink
Fix seam polyline looping like a polygon in infinite loop.
Browse files Browse the repository at this point in the history
  • Loading branch information
supermerill committed Jul 4, 2024
1 parent 1f41261 commit 0c10d20
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/libslic3r/GCode/SeamPlacer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -747,8 +747,13 @@ void process_perimeter_polylines(const PolylineWithEnd &orig_polyline, float z_c
}
std::vector<size_t> viable_points_indices;
std::vector<size_t> large_angle_points_indices;
for (size_t point_idx = longest_patch.first; point_idx != longest_patch.second;
point_idx = next_index(point_idx)) {
assert(longest_patch.first >= perimeter.start_index && longest_patch.first <= perimeter.end_index);
assert(longest_patch.second >= perimeter.start_index && longest_patch.second <= perimeter.end_index);
assert(is_polygon || longest_patch.first <= longest_patch.second);
for (size_t point_idx = longest_patch.first;
point_idx != longest_patch.second;
point_idx = is_polygon ? next_index(point_idx) : (1 + point_idx)) {
size_t viable_points_indices_count = viable_points_indices.size();
viable_points_indices.push_back(point_idx);
if (std::abs(result.points[point_idx].local_ccw_angle)
> SeamPlacer::sharp_angle_snapping_threshold) {
Expand Down

0 comments on commit 0c10d20

Please sign in to comment.