Skip to content

Conversation

@soesau
Copy link
Member

@soesau soesau commented Oct 7, 2025

Summary of Changes

Circle_2 and Sphere_3 intersections are not fully consistent. The Circle_2 - Segment_2 intersection does consider inclusion as intersection. The same is true for Sphere_3 and Iso_cuboid_3.

This PR changes the behavior of those two intersection methods and adds specific intersection methods with inclusion for Circle_2 and Iso_rectangle_2 to AABB_traits_2 with static filter. The same will be done for Sphere_3, Iso_cuboid_3 and AABB_traits_3.

Release Management

soesau added 4 commits October 8, 2025 09:21
added filtered traits for 3d AABB tree
changed behavior of Sphere_3 Iso_cuboid_3 intersection
@soesau
Copy link
Member Author

soesau commented Oct 17, 2025

documentation still needs to be updated, but can be tested already

@sloriot
Copy link
Member

sloriot commented Oct 30, 2025

Looks in CGAL-6.2-Ic-30 but the PR is still under review.

@sloriot sloriot added the Not yet approved The feature or pull-request has not yet been approved. label Oct 30, 2025
@soesau
Copy link
Member Author

soesau commented Oct 31, 2025

Edit: The timeouts are due to another PR.

I suspect this PR to be responsible for the timeouts . However, the timeouts only concern debug compilations and could not be reproduced locally (msvc).

assert( !CGAL::Epick::Has_static_filters);
#endif

#ifdef CGAL_DONT_USE_LAZY_KERNEL
Copy link
Member

Choose a reason for hiding this comment

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

why removing this?

Copy link
Member Author

Choose a reason for hiding this comment

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

CGAL_LAZY_KERNEL_USE_STATIC_FILTERS_BY_DEFAULT is not used or set anywhere and it was conflicting with the change in Lazy_kernel.h
I can put it back and replace the macro from above.
Mael suggested to remove it.

return recursive_descendant(child(node, i), remaining_indices...);
}

bool do_intersect(Node_index n, const Sphere& sphere) const {
Copy link
Member

Choose a reason for hiding this comment

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

why not renaming the function and keep the rest as is? I'm not sure to understand the changes

Copy link
Member

Choose a reason for hiding this comment

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

also for intersected_nodes(), shouldn't we have version with the intersection functor provided as third parameter?

Copy link
Member Author

Choose a reason for hiding this comment

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

do_intersect(Node_index n, const Sphere& sphere) was a private method that was used in the recursive nearest neighbors method. However, the nodes are sorted with respect to the distance. Thus, most of the work for calculating an intersection is already done. The new version benchmarked a bit faster in the tests I did.

The change for intersected_nodes makes sense. I can add it.

Copy link
Member Author

Choose a reason for hiding this comment

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

I added intersected_nodes using a functor. However, I don't have a solution for d dimensional so the method without provided functor is broken in case of dimension>3

@sloriot
Copy link
Member

sloriot commented Dec 4, 2025

Ping @soesau

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.

AABB_tree: Circle_2/Iso_rectangle_2 intersection with inclusion Consistency of bounding objects in 3D intersections

3 participants