Skip to content

Conversation

@sgiraudot
Copy link
Contributor

@sgiraudot sgiraudot commented Dec 15, 2020

Rationale

CGAL currently offers a function do_intersect() that, for simplicity, we can distinguish into 2 main variants:

  • CGAL::do_intersect() provided by the packages Intersection_2/3: works on Kernel objects (points, segments, etc.), returns true if objects intersect even at their boundaries (e.g. 2 segments sharing a common vertex) compatible with inexact constructions

  • CGAL::do_intersect() provided by Boolean_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 return false), 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 becomes CGAL::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_2 is renamed Regularized_boolean_set_operations_2.

License and copyright ownership

(No change)

CHANGES.md

Done

Submission

Small feature page

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
  • Rename the package

@lrineau lrineau marked this pull request as draft December 15, 2020 10:22
@sloriot sloriot self-assigned this Sep 23, 2021
@sloriot sloriot added this to the 5.5-beta1 milestone Sep 23, 2021
@sloriot sloriot changed the base branch from master to 5.2.x-branch December 2, 2021 14:29
@sloriot sloriot changed the base branch from 5.2.x-branch to master December 2, 2021 14:29
@sloriot
Copy link
Member

sloriot commented Dec 3, 2021

/build:v0

@github-actions
Copy link

github-actions bot commented Dec 3, 2021

The documentation is built. It will be available, after a few minutes, here: https://cgal.github.io/5284/v0/Manual/index.html

@sloriot sloriot marked this pull request as ready for review December 3, 2021 15:58
@sloriot sloriot requested a review from efifogel December 3, 2021 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants