Do not discard minimum-length paths in FlexPath::remove_overlapping_points()
#278
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently,
FlexPath::remove_overlapping_points()
removes points from a path if the length is less than or equal to the path's tolerance. But the equality test discards a minimum-length path, which is exactly one database unit in length.I believe this is what's occurred in #268 and #277, both of which contain paths that have a length of 0.001 microns. That's the value for path tolerance when the library has the default unit and precision values of 1e-6 and 1e-9, respectively.
This PR updates
remove_overlapping_points()
to discard points only if the computed length is strictly less than the tolerance, and adds a couple of tests.