cgal/Intersections_3/test/Intersections_3
Sebastien Loriot 9dea168da5
Fix for Line_3 Ray_3 do_intersect (#8398)
## Summary of Changes

Some non intersection is wrongfully detected as an intersection for the
Line_3 Ray_3 combination. Here is an illustration:


![image](https://github.com/user-attachments/assets/f18fd662-5ad6-4a01-9a49-a8d0c62cf7fe)

The base code is :
```cpp
  if(!do_intersect(l, r.supporting_line()))
    return false;

  typename K::Coplanar_orientation_3 pred = k.coplanar_orientation_3_object();
  CGAL::Orientation p0p1s = pred(l.point(0), l.point(1), r.source());
  if(p0p1s == COLLINEAR)
    return true;

  CGAL::Orientation stp0 = pred(r.source(), r.second_point(), l.point(0));
  if(stp0 == COLLINEAR)
    return Ray_3_has_on_collinear_Point_3(r,l.point(0),k);

  return (p0p1s != stp0);
```

The supporting line of the ray intersects the line, and then nothing is
collinear, so we check L0,L1,R1 vs R0,R1,L0, which are of opposite sign
so there is an intersection... but there is none.

This check is very similar to what is done in Ray_3-Ray_3, where it is
correct.

I did a naive fix for now: without loss of generality we can go to the
configuration below


![image](https://github.com/user-attachments/assets/5f004941-7f58-4bf3-8416-7dc2144a891f)

and so we have an intersection as long as the ray "points" in the other
slab wrt to the line. And so, in coplanar orientation checks, if the
orientation L0,L1,R0 differs from L0, L1, (L0 + (R1-R0)).

I feel like I could probably skip at least a translation by having
something like Coplanar_orientation(P3, P3, P3, V3), and maybe even
more...

## Release Management

* Affected package(s): `Intersections_3`
* Issue(s) solved (if any): -
* Feature/Small Feature (if any): -
* License and copyright ownership: no change
2024-08-26 15:21:21 +02:00
..
CMakeLists.txt Massive update of CMake policies to version 3.23 2022-05-06 09:34:35 +02:00
bbox_other_do_intersect_test.cpp remove trailing whitespace 2022-09-07 08:44:42 +02:00
call_test.cpp Fix misc issues within intersection tests themselves 2021-08-06 10:12:37 +02:00
circle_other.cpp run the script to remove tabs and trailing whitespaces 2020-03-26 13:25:16 +01:00
create_bbox_mesh.h
intersection_test_helper.h Remove debug print 2021-08-25 08:39:25 +02:00
issue_5428.cpp Add a lot more testing to Intersections_3 2021-06-23 17:39:52 +02:00
segment_segment.cpp clang-tidy on tests 2021-02-18 15:15:12 +01:00
test_intersections_Iso_cuboid_3.cpp Test improvements 2021-06-25 21:28:54 +02:00
test_intersections_Line_3.cpp Add new Intersection_3 test cases 2024-08-06 10:36:09 +02:00
test_intersections_Plane_3.cpp Fix constructing degenerate spheres in Plane_3 intersection tests 2021-08-29 13:53:33 +02:00
test_intersections_Point_3.cpp Fix misc issues within intersection tests themselves 2021-08-06 10:12:37 +02:00
test_intersections_Ray_3.cpp Fix for Line_3 Ray_3 do_intersect (#8398) 2024-08-26 15:21:21 +02:00
test_intersections_Segment_3.cpp Fix Segment_3-Sphere_3 do intersect: detect fully contained segments 2021-06-28 13:26:28 +02:00
test_intersections_Sphere_3.cpp Fix bad tests 2021-08-23 11:49:54 +02:00
test_intersections_Tetrahedron_3.cpp Add a few more tests to Tr-Tet 2022-09-07 16:00:59 +02:00
triangle_3_triangle_3_intersection.cpp clang-tidy on tests 2021-02-18 15:15:12 +01:00
triangle_other.cpp run the script to remove tabs and trailing whitespaces 2020-03-26 13:25:16 +01:00
triangle_other_intersection_test.cpp Fix warning 2021-08-31 11:08:39 +02:00