MCPcopy Create free account
hub / github.com/Kitware/VTK / TestIssue17092

Function TestIssue17092

Common/DataModel/Testing/Cxx/UnitTestTriangleIntersection.cxx:550–570  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

548}
549
550int TestIssue17092()
551{
552 // An instance where triangle intersection failed was reported here:
553 // https://gitlab.kitware.com/vtk/vtk/-/issues/17092. It was fixed here:
554 // https://gitlab.kitware.com/vtk/vtk/-/merge_requests/3886
555
556 double t1[3][3] = { { 0., 0., 0. }, { 5., 0., 0. }, { 0., 5., 0. } };
557 double t2[3][3] = { { 10., 5., 0. }, { 5., 10., 0. }, { 1., 1., 0. } };
558
559 int returnValue = vtkTriangle::TrianglesIntersect(t1[0], t1[1], t1[2], t2[0], t2[1], t2[2]);
560
561 if (returnValue != VTK_YES_INTERSECTION)
562 {
563 std::cout << "Triangle " << TriangleToString(t1[0], t1[1], t1[2]) << std::endl;
564 std::cout << " does not intersect " << TriangleToString(t2[0], t2[1], t2[2]) << " and should."
565 << std::endl;
566 return EXIT_FAILURE;
567 }
568
569 return EXIT_SUCCESS;
570}
571
572int TestMR4529()
573{

Callers 1

TestTriangleIntersectionFunction · 0.85

Calls 2

TrianglesIntersectFunction · 0.85
TriangleToStringFunction · 0.85

Tested by

no test coverage detected