CGAL 3.5 is the latest version of the library, but it still does not include support for intersection between
Segment_3. I recently requested for this with the CGAL team on their cgal-discuss mailing list. Pierre Alliez, the INRIA researcher who is working on this was kind enough to share his WIP code on this with me. It supports intersection between the following entities:
I have made available this code here. This code is still not release ready, so if you run into any problems please email Pierre with your feedback.
Here is how to use it:
Unzip the 4 header files into your
$(CGAL_DIR)\include\CGAL\intersection_3_1.h file in any editor.
At the end of the file (just before the last
#endif) add the following includes:
cpp #include <CGAL/Intersections_3/Triangle_3_segment_3_intersection.h> #include <CGAL/Intersections_3/Triangle_3_line_3_intersection.h> #include <CGAL/Intersections_3/Triangle_3_ray_3_intersection.h> #include <CGAL/Intersections_3/Triangle_3_plane_3_intersection.h>
You should be able to successfully intersect these geometrical entities in your CGAL code after this.