-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
GeometryOps.jl/src/transformations/simplify.jl
Lines 298 to 307 in 769c3e1
| results = Vector{Int}(undef, max_points + (preserve_endpoint ? 0 : 1)) | |
| results[1], results[2] = 1, npoints | |
| # Loop through points until stopping criteria are fulfilled | |
| i = 2 # already have first and last point added | |
| start_idx, end_idx = 1, npoints | |
| max_idx, max_dist = _find_max_squared_dist(points, start_idx, end_idx) | |
| while i ≤ min(MIN_POINTS + 1, max_points) || (i < max_points && max_dist > max_tol) | |
| # Add next point to results | |
| i += 1 | |
| results[i] = max_idx |
In the referenced lines, the i+=1 can cause a BoundsError in the line below it, as the while loop allows for max_points number. I hit this during a normal simplify(x, tol=y) operation.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels