Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mesh to mesh intersections

I'm looking for a library or a paper that describes how to determine if one triangular mesh intersects another.

Interestingly I am coming up empty. If there is some way to do it in CGAL, it is eluding me.

It seems like it clearly should be possible, because triangle intersection is possible and because each mesh contains a finite number of triangles. But I assume there must be a better way to do it than the obvious O(n*m) approach where one mesh has n triangles and the other has m triangles.

like image 442
Doug McClean Avatar asked Nov 01 '11 21:11

Doug McClean


1 Answers

The way we usually do it using CGAL is with CGAL::box_intersection_d.

You can make it by mixing this example with this one.

EDIT:

Since CGAL 4.12 there is now the function CGAL::Polygon_mesh_processing::do_intersect().

like image 103
sloriot Avatar answered Oct 03 '22 10:10

sloriot