No intersection for polygons with close boundaries
- Dominant language
- C++
- Stars
- 517
- Forks
- 232
- PR merge metrics
- No merged PRs in 30d
Description
No intersection is returned for the example
where the intersection should basically be the green polygon. This is on develop with https://github.com/boostorg/geometry/pull/1479 already merged.
Here is the example written as test case: https://github.com/mjacobse/geometry/commit/42e03eef17902348a362d5d14c0c23938d5d76fa
It fails with the output
```
libs/geometry/test/algorithms/set_operations/intersection/test_intersection.hpp(137): error: in "test_main_caller( argc_ argv )": intersection: issue_1487 #outputs expected: { 1} detected: 0 type: d
libs/geometry/test/algorithms/set_operations/intersection/test_intersection.hpp(155): error: in "test_main_caller( argc_ argv )": intersection: issue_1487 #area expected: 18983.884971862571547 detected: 0 type: d
libs/geometry/test/algorithms/set_operations/intersection/test_intersection.hpp(137): error: in "test_main_caller( argc_ argv )": intersection: issue_1487 #outputs expected: { 1} detected: 0 type: d ccw
libs/geometry/test/algorithms/set_operations/intersection/test_intersection.hpp(155): error: in "test_main_caller( argc_ argv )": intersection: issue_1487 #area expected: 18983.884971862571547 detected: 0 type: d ccw
```
Contributor guide
Research direction
Start with the reproduction in the linked commit and run the intersection tests under libs/geometry/test/algorithms/set_operations/intersection/, especially test_intersection.hpp. Investigate why issue_1487 produces zero outputs for the supplied polygons. Done means the test reports one intersection with area 18983.884971862571547 in both tested orientations.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 62/100