cgal icon indicating copy to clipboard operation
cgal copied to clipboard

AABB_tree: Circle_2/Iso_rectangle_2 intersection with inclusion

Open soesau opened this issue 7 months ago • 4 comments

Issue Details

The AABB_tree with 2D primitives uses its own do_intersect_circle_iso_rectangle_2 which considers inclusion as intersection while the corresponding function in Intersection_2 does not. The AABB_tree with 3D primitives also uses a static filter for some optimization which would also be helpful in the 2D variant.

https://github.com/CGAL/cgal/pull/8891 created the internal do_intersect_circle_iso_rectangle_2 in AABB_traits_2, which provides correct closest_point results.

soesau avatar May 26 '25 13:05 soesau

Differences between 2D and 3D: A Segment_2 inside a Circle_2 is considered as intersection. All other contained objects are not considered intersections. Only a Bbox_3 or Iso_cuboid_3 contained in a Sphere_3 are considered as intersection. A Segment_3 is not.

soesau avatar Sep 24 '25 14:09 soesau

Is inclusion intersection? in 2D:

Triangle_2 Iso_rectangle_2 Circle_2 Point_2 Segment_2
Triangle_2 1 1 1 1 1
Iso_rectangle_2 1 1 1 1 1
Circle_2 (1) 1

Intersections are symmetric, i.e., do_intersect(a, b) = do_intersect(b, a). Triangle_2 inside Circle_2 do not intersect, but Circle_2 inside Triangle_2 does intersect.

3D:

Tetrahedron_3 Iso_cuboid_3 Sphere_3 Point_3 Segment_3 Triangle_3
Tetrahedron_3 1 1 1 1 1 1
Iso_cuboid_3 1 1 1 1 1 1
Sphere_3 1

soesau avatar Sep 26 '25 15:09 soesau

In case we opt for "inside" semantics, do we then also have to take into account orientation?

afabri avatar Sep 29 '25 07:09 afabri

When unifying, please also look at the circular and spherical kernel.

afabri avatar Sep 29 '25 09:09 afabri