Skip to content

Conversation

@kashish2710
Copy link

This PR adds a minimal regression test reproducing issue #1439.

The test shows that boost::geometry::intersection currently produces
a non-empty result for two polygons that do not overlap.

The test fails on Boost 1.89 (tested on Linux / Google Colab),
confirming that the reported behavior is still present.

Once the underlying issue is fixed, this test will help ensure
that the behavior does not regress in future changes.

Screenshot 2025-12-13 at 4 32 31 PM

Still reproducible on Boost 1.89 (Linux).
See attached output showing non-empty intersection for non-overlapping polygons.

Adds a minimal test reproducing issue boostorg#1439 on Boost 1.89
@kashish2710
Copy link
Author

The test is intentionally minimal to clearly reproduce the issue.
I can adapt it to the Boost test framework if preferred.


// Expected: no intersection
return output.empty() ? 0 : 1;
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot. But yes, please adapt it to our current framework.

The cases themselves can go to:
https://github.com/boostorg/geometry/blob/develop/test/algorithms/overlay/overlay_cases.hpp#L1273

The test can go to:
https://github.com/boostorg/geometry/blob/develop/test/algorithms/set_operations/intersection/intersection.cpp#L297

These tests test on area, so the expected area should be 0.0

The test will then fail. So you can put the test between
#ifdef BOOST_GEOMETRY_TEST_ENABLE_FAILING
and
#endif

Copy link
Collaborator

@barendgehrels barendgehrels left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As you mentioned, and I added in the comment,
better to have it in the framework.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants