bg::intersection result is the second input polygon instead of empty polygon
Maintainers usually reply within 2 days
@barendgehrels is already working on this.
Since Nov 24, 2024.
Assessment
This issue has not been assessed yet.
Description
on version 1.83 the bg::Intersection generates wrong result for this specific case. The result polygon is same as the second input polygon Q.
When the first polygon P has instead of the value 1e-14 eg. 1e-13 or 1e-15, the result is empty, which is correct.
using boost_point_2d = boost::geometry::model::d2::point_xy;
using boost_polygon_2d = boost::geometry::model::polygon<boost_point_2d, false>;
using boost_multipolygon_2d = boost::geometry::model::multi_polygon<boost_polygon_2d>;
boost_polygon_2d P = {{{1e-14, 0}, {-10, 50}, {-20, 50}, {1e-14, 0}}};
boost_polygon_2d Q = {{{0, 1000}, {0, 0}, {1000, 0}, {1000, 1000}, {0, 1000}}};
boost_multipolygon_2d R;
bg::intersection(P, Q, R);
- Dominant language
- C++
- Stars
- 519
- Forks
- 241
- Avg merge
- 4d 15h
- Merged PRs (30d)
- 9
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from boostorg/geometry
-
Difficulty 4/5 3-5 days Newbie friendliness 57/100
boostorg/geometry#1523 · 3 comments ·
Maintainers usually reply within 2 days
-
LLM generated regression case in differencePossibly taken @barendgehrels claimed this 14 days ago. Openbug
boostorg/geometry#1511 · 1 reaction · 1 assignee ·
Maintainers usually reply within 2 days
-
union_ of two valid polygons sharing an edge returns empty (argument order dependent)Possibly taken @barendgehrels claimed this 18 days ago. Open
boostorg/geometry#1506 · 1 comment · 1 reaction · 1 assignee ·
Maintainers usually reply within 2 days
-
difference() produces invalid (self-intersecting) result for valid polygon-with-hole inputMay be free again A pull request for this issue was closed without being merged. Open
Difficulty 3/5 1-2 days Newbie friendliness 70/100
boostorg/geometry#1490 · 1 comment · 1 reaction ·
Maintainers usually reply within 2 days
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
boostorg/geometry#1476 · 6 comments ·
Maintainers usually reply within 2 days
All issues in boostorg/geometry
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
uxlfoundation/oneDNN#6604 · 1 comment ·
Maintainers usually reply within 2 days
-
[Bug]: RoundToNearest truncates in plugins compiled with spcomp 1.13Possibly taken @fmu1337 claimed this today. OpenBug
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
alliedmodders/sourcemod#2627 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
lballabio/QuantLib#3134 · 1 comment ·
Maintainers usually reply within 3 days
-
new issue
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
llvm/llvm-project#245835 ·
Maintainers usually reply within 1 day
-
documentation
Difficulty 1/5 Under an hour Newbie friendliness 72/100
EchoTools/nevr-runtime#2823 ·
Maintainers usually reply within 1 day