Skip to content

Fix for CoplanarTrianglesIntersect

In addition to !3886 (merged) this commit should finally fix the intersection test of coplanar triangles.

The test fails if three points lie on one line. The result would be "no intersection". triangleintersection

p1 = [1.751, -0.993, 0]
q1 = [-3.021, 2.855, 0]
r1 = [4.14, -4.025, 0]
p2 = [1.751, -0.5, 0]
q2 = [1.751, 1.326, 0]
r2 = [-3.382, 2.276, 0]

One test is just checking if p1 belongs to region R1 or R2, but not R2 or on the boundary of R2.

Olivier Devillers, Philippe Guigue. Faster Triangle-Triangle Intersection Tests. RR-4488, INRIA. 2002. Section 4.1 "In all other cases, a circular permutation can be applied to the vertices of T2 so that p1 either belongs to the interior of the R1 labelled region or belongs to the interior or to the boundary of the R2 labelled region as defined in Figure 6."

Merge request reports

Loading