-
Notifications
You must be signed in to change notification settings - Fork 1.5k
[Small Feature] Unregularized do_intersect(Polygon, Polygon) compatible with inexact constructions #5284
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
sgiraudot
wants to merge
16
commits into
CGAL:master
Choose a base branch
from
sgiraudot:BSO-Fix_do_intersect-GF
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/build:v0 |
The documentation is built. It will be available, after a few minutes, here: https://cgal.github.io/5284/v0/Manual/index.html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
CHANGES.md not updated
Conflicts
Not yet approved
The feature or pull-request has not yet been approved.
Pkg:Boolean_set_operations_2
Small feature
TODO
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.
Rationale
CGAL currently offers a function
do_intersect()
that, for simplicity, we can distinguish into 2 main variants:CGAL::do_intersect()
provided by the packagesIntersection_2/3
: works on Kernel objects (points, segments, etc.), returnstrue
if objects intersect even at their boundaries (e.g. 2 segments sharing a common vertex) compatible with inexact constructionsCGAL::do_intersect()
provided byBoolean_set_operations_2
: works on polygon objects (Polygon_2
,Polygon_with_holes_2
, etc.), returns true only if objects overlap (only the "strict" intersection is tested, 2 polygons sharing only a vertex or an edge will returnfalse
), requires exact constructionsThis second variants raises 2 issues: first, the behavior (open interval intersection VS closed interval interseciton) is counter-intuitive and differs from the general function. Second, requiring exact constructions for a function that is obviously a predicate is not satisfying.
After discussions with @efifogel, it is agreed that the difference of behavior is justified by the fact that the Boolean Set Operations 2 implements regularized boolean operations, which implies that only the closure of the interior of the result is considered. So this behavior should be kept.
Nevertheless, it would still make sense to add a non-regularized variant of
do_intersect()
for polygons that doesn't require exact constructions.Summary of API changes
CGAL::do_intersect()
variant for polygons becomesCGAL::Regularized_boolean_set_operations_2::do_intersect()
Regularized_boolean_set_operations_2
CGAL::do_intersect()
is introduced, handling non-strict intersections without requiring exact constructionsBoolean_set_operations_2
is renamedRegularized_boolean_set_operations_2
.License and copyright ownership
(No change)
CHANGES.md
Done
Submission
Small feature page
Status