[Small Feature] Unregularized do_intersect(Polygon, Polygon) compatible with inexact constructions
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.), returnstrueif objects intersect even at their boundaries (e.g. 2 segments sharing a common vertex) compatible with inexact constructions -
CGAL::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 constructions
This 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
- The current
CGAL::do_intersect()variant for polygons becomesCGAL::Regularized_boolean_set_operations_2::do_intersect() - All other operations in this package are also placed in the namespace
Regularized_boolean_set_operations_2 - A new variant of
CGAL::do_intersect()is introduced, handling non-strict intersections without requiring exact constructions -
Boolean_set_operations_2is renamedRegularized_boolean_set_operations_2.
License and copyright ownership
(No change)
CHANGES.md
Done
Submission
Status
- [ ] Add todo in issue for 5.5 to add RW rules for the renaming of the packages (including package_overview change of shortcut) and doxygen groups (PkgBooleanSetOperations2Ref, PkgBooleanSetOperations2Concepts, PkgBooleanSetOperations2)
- [ ] Handle backward compatibility of free functions
- [x] Rename the package
/build:v0
The documentation is built. It will be available, after a few minutes, here: https://cgal.github.io/5284/v0/Manual/index.html