File tree Expand file tree Collapse file tree 2 files changed +5
-14
lines changed Expand file tree Collapse file tree 2 files changed +5
-14
lines changed Original file line number Diff line number Diff line change @@ -937,16 +937,10 @@ namespace geode
937937 const auto & facet_vertices =
938938 Tetrahedron::tetrahedron_facet_vertex[facet];
939939 const auto & vertices = tetra.vertices ();
940- const auto output = point_triangle_signed_distance ( point,
940+ const auto output = point_triangle_distance ( point,
941941 Triangle3D{ vertices[facet_vertices[0 ]],
942942 vertices[facet_vertices[1 ]], vertices[facet_vertices[2 ]] } );
943- // Tetra facet normals point towards inside
944- if ( tetrahedron_volume_sign ( tetra ) == Sign::negative )
945- {
946- return output;
947- }
948- return std::make_tuple (
949- -std::get< 0 >( output ), std::get< 1 >( output ) );
943+ return output;
950944 }
951945
952946 std::tuple< double , Point3D > point_triangle_signed_distance (
Original file line number Diff line number Diff line change @@ -748,16 +748,14 @@ void test_point_tetrahedron_distance()
748748 geode::point_tetrahedron_distance ( q1, tetra );
749749 OPENGEODE_EXCEPTION ( distance == 0 && closest_point == q1,
750750 " [Test] Wrong result for point_tetrahedron_distance with query "
751- " Point3D "
752- " q1" );
751+ " Point3D q1" );
753752
754753 const geode::Point3D q2{ { 0.25 , 0.25 , 0.0 } };
755754 std::tie ( distance, closest_point ) =
756755 geode::point_tetrahedron_distance ( q2, tetra );
757756 OPENGEODE_EXCEPTION ( distance == 0 && closest_point == q2,
758757 " [Test] Wrong result for point_tetrahedron_distance with query "
759- " Point3D "
760- " q2" );
758+ " Point3D q2" );
761759
762760 const geode::Point3D q3{ { 2.5 , 2.5 , 0.0 } };
763761 std::tie ( distance, closest_point ) =
@@ -766,8 +764,7 @@ void test_point_tetrahedron_distance()
766764 OPENGEODE_EXCEPTION (
767765 distance == std::sqrt ( 8 ) && closest_point.inexact_equal ( answer ),
768766 " [Test] Wrong result for point_tetrahedron_distance with query "
769- " Point3D "
770- " q3" );
767+ " Point3D q3" );
771768 };
772769
773770 const geode::Point3D a{ { 0.0 , 0.0 , 0.0 } };
You can’t perform that action at this time.
0 commit comments