Alec Jacobson e9ff3a9e96 CGAL cdt with triangle's api (#1811) há 4 anos atrás
..
copyleft e9ff3a9e96 CGAL cdt with triangle's api (#1811) há 4 anos atrás
embree 59b517a4a4 bump embree version; bump sse2 to avx2 (#1648) há 5 anos atrás
mosek aa40b908c9 updated gtest to catch há 7 anos atrás
predicates 0855c2ef8c Merge branch 'dev' of https://github.com/libigl/libigl into pr há 6 anos atrás
triangle 07e2b01a3c move scaf to triangle folder há 5 anos atrás
MshLoader.cpp 8c95d1044e Added improved .msh reader/writer + tests + example (#1578) há 5 anos atrás
MshSaver.cpp 8c95d1044e Added improved .msh reader/writer + tests + example (#1578) há 5 anos atrás
accumarray.cpp 1deb471727 extra boundary_facets outputs; better sort prototypes; templates; cleanup há 7 anos atrás
avg_edge_length.cpp 6a7428694f rm load_mesh há 6 anos atrás
barycentric_interpolation.cpp 1de2627280 tests há 5 anos atrás
bbw.cpp d3052ef4c7 Replace IGL_DEBUG_OFF with a [slow] tag for now. há 6 anos atrás
bezier.cpp 4ab389d462 bezier eval and fit cubic bezier splin há 5 anos atrás
blkdiag.cpp 775f2354fa blkdiag function há 5 anos atrás
blue_noise.cpp 43da16bbd0 tighter test há 5 anos atrás
boundary_facets.cpp 1deb471727 extra boundary_facets outputs; better sort prototypes; templates; cleanup há 7 anos atrás
boundary_loop.cpp d3052ef4c7 Replace IGL_DEBUG_OFF with a [slow] tag for now. há 6 anos atrás
cat.cpp 450935874f Extending igl::cat to work with std::vectors AND Allowing N-gons in writeOBJ (#1108) há 6 anos atrás
circulation.cpp 1c3c7c7b6f ported new tests to catch2 há 7 anos atrás
cotmatrix.cpp ad54f2dfe2 int->Index; depreacted pinv; trivial unit test há 5 anos atrás
cotmatrix_entries.cpp 6a7428694f rm load_mesh há 6 anos atrás
cotmatrix_intrinsic.cpp d3052ef4c7 Replace IGL_DEBUG_OFF with a [slow] tag for now. há 6 anos atrás
cr_vector_curvature_correction.cpp 8ea0b8c6dc Added vector Dirichlet and curved Hessian functionality (#1560) há 5 anos atrás
cr_vector_laplacian.cpp 8ea0b8c6dc Added vector Dirichlet and curved Hessian functionality (#1560) há 5 anos atrás
cumprod.cpp 1c3c7c7b6f ported new tests to catch2 há 7 anos atrás
cumsum.cpp 1c3c7c7b6f ported new tests to catch2 há 7 anos atrás
curved_hessian_energy.cpp 8ea0b8c6dc Added vector Dirichlet and curved Hessian functionality (#1560) há 5 anos atrás
cut_mesh.cpp f4d14cc7d1 change cut mask há 6 anos atrás
cut_to_disk.cpp 6a7428694f rm load_mesh há 6 anos atrás
decimate.cpp 41454f823d fix decimate bug há 5 anos atrás
delaunay_triangulation.cpp 4ce917d424 Issue 521 (#1327) há 5 anos atrás
dijkstra.cpp 1df0987271 Fix issue with dijkstra algorithm (#1497) há 5 anos atrás
direct_delta_mush.cpp a3c3ef1572 update test too há 5 anos atrás
dirname.cpp aa40b908c9 updated gtest to catch há 7 anos atrás
doublearea.cpp d3052ef4c7 Replace IGL_DEBUG_OFF with a [slow] tag for now. há 6 anos atrás
edge_exists_near.cpp 1c3c7c7b6f ported new tests to catch2 há 7 anos atrás
edge_flaps.cpp d3052ef4c7 Replace IGL_DEBUG_OFF with a [slow] tag for now. há 6 anos atrás
edge_lengths.cpp 6a7428694f rm load_mesh há 6 anos atrás
facet_components.cpp 1aa35de249 passing facet_components unit test há 5 anos atrás
fast_winding_number.cpp d3052ef4c7 Replace IGL_DEBUG_OFF with a [slow] tag for now. há 6 anos atrás
fit_cubic_bezier.cpp 4ab389d462 bezier eval and fit cubic bezier splin há 5 anos atrás
grad.cpp 607148cf72 Misc compilation fixes for Eigen 3.3 compatibility. há 7 anos atrás
grad_intrinsic.cpp 607148cf72 Misc compilation fixes for Eigen 3.3 compatibility. há 7 anos atrás
grid.cpp 1c3c7c7b6f ported new tests to catch2 há 7 anos atrás
guess_extension.cpp 49a74590d4 cleand cmake and added INSTANTIATE_TEST_CASE_P há 7 anos atrás
heat_geodesics.cpp f3a201f1e1 Update heat_geodesics.cpp (#1512) há 5 anos atrás
intrinsic_delaunay_cotmatrix.cpp d3052ef4c7 Replace IGL_DEBUG_OFF with a [slow] tag for now. há 6 anos atrás
intrinsic_delaunay_triangulation.cpp 1c3c7c7b6f ported new tests to catch2 há 7 anos atrás
is_delaunay.cpp 1c3c7c7b6f ported new tests to catch2 há 7 anos atrás
is_edge_manifold.cpp d3052ef4c7 Replace IGL_DEBUG_OFF with a [slow] tag for now. há 6 anos atrás
is_intrinsic_delaunay.cpp 1c3c7c7b6f ported new tests to catch2 há 7 anos atrás
is_irregular_vertex.cpp 6a7428694f rm load_mesh há 6 anos atrás
is_symmetric.cpp aa40b908c9 updated gtest to catch há 7 anos atrás
ismember.cpp aa40b908c9 updated gtest to catch há 7 anos atrás
iterative_closest_point.cpp d3052ef4c7 Replace IGL_DEBUG_OFF with a [slow] tag for now. há 6 anos atrás
knn.cpp 21acee15fe making knn and octree work on more types than double, allowing knn to do nearest neighbor searches between two different point clouds (#1313) há 5 anos atrás
list_to_matrix.cpp 49a74590d4 cleand cmake and added INSTANTIATE_TEST_CASE_P há 7 anos atrás
min_quad_with_fixed.cpp 2e988bec2e more explicit template args for win há 4 anos atrás
orient_halfedges.cpp 8ea0b8c6dc Added vector Dirichlet and curved Hessian functionality (#1560) há 5 anos atrás
path_to_edges.cpp a03d1a2d56 Path to edges + various template instantiations (#1259) há 6 anos atrás
path_to_executable.cpp 1408bd36b0 fix unit test for path_to_executable() on windows by taking into account that it has a '.exe' suffix. há 6 anos atrás
pathinfo.cpp aa40b908c9 updated gtest to catch há 7 anos atrás
per_face_normals.cpp d3052ef4c7 Replace IGL_DEBUG_OFF with a [slow] tag for now. há 6 anos atrás
polygon_corners.cpp 5a68b6e924 polygon corners test há 5 anos atrás
principal_curvature.cpp aaa89ffcbb Fix the order of principal curvature (#1767) há 4 anos atrás
qslim.cpp d3052ef4c7 Replace IGL_DEBUG_OFF with a [slow] tag for now. há 6 anos atrás
quadprog.cpp 2e988bec2e more explicit template args for win há 4 anos atrás
randperm.cpp 843438eab9 Fix logic error for URNG in igl::randperm há 6 anos atrás
readDMAT.cpp 46a8dd2fd4 rm load_matrix há 6 anos atrás
readMESH.cpp 7a3af9c851 Use unique filename for unit tests to avoid filesystem race conditions + update github actions for nightly job. há 4 anos atrás
readMSH.cpp 8c95d1044e Added improved .msh reader/writer + tests + example (#1578) há 5 anos atrás
readOBJ.cpp 6a7428694f rm load_mesh há 6 anos atrás
readOFF.cpp 6a7428694f rm load_mesh há 6 anos atrás
readPLY.cpp 52c6f14ca6 Replace .ply reader/writer with tinyply library, supersedes libigl/libigl#1235 há 5 anos atrás
remesh_along_isoline.cpp 3150c23b62 RM load_mesh and use igl::read_triangle_mesh() and test_common::data_path() in test for remesh_along_isoline as per https://github.com/libigl/libigl/pull/1365 há 5 anos atrás
rigid_alignment.cpp 88e3dd1e3e iterative closest point alg, tutoiral, test há 6 anos atrás
seam_edges.cpp aa40b908c9 updated gtest to catch há 7 anos atrás
segment_segment_intersect.cpp 16ce83c381 rename test há 6 anos atrás
setdiff.cpp aa40b908c9 updated gtest to catch há 7 anos atrás
signed_distance.cpp 63b3669a87 test update... há 5 anos atrás
slice.cpp aa40b908c9 updated gtest to catch há 7 anos atrás
slice_into.cpp aa40b908c9 updated gtest to catch há 7 anos atrás
slice_sorted.cpp 26053f696c Avoid involving Eigen/SparseExtra in slice. (#1370) há 5 anos atrás
sort.cpp 49a74590d4 cleand cmake and added INSTANTIATE_TEST_CASE_P há 7 anos atrás
sparse_voxel_grid.cpp 4d628e75fe sparse_voxel_grid test há 5 anos atrás
squared_edge_lengths.cpp 6a7428694f rm load_mesh há 6 anos atrás
tet_tet_adjacency.cpp 49a74590d4 cleand cmake and added INSTANTIATE_TEST_CASE_P há 7 anos atrás
triangle_triangle_adjacency.cpp d3052ef4c7 Replace IGL_DEBUG_OFF with a [slow] tag for now. há 6 anos atrás
triangulated_grid.cpp 1c3c7c7b6f ported new tests to catch2 há 7 anos atrás
unique.cpp aa40b908c9 updated gtest to catch há 7 anos atrás
unique_simplices.cpp 1c3c7c7b6f ported new tests to catch2 há 7 anos atrás
upsample.cpp d3052ef4c7 Replace IGL_DEBUG_OFF with a [slow] tag for now. há 6 anos atrás
writeMSH.cpp 8c95d1044e Added improved .msh reader/writer + tests + example (#1578) há 5 anos atrás
writePLY.cpp 7a3af9c851 Use unique filename for unit tests to avoid filesystem race conditions + update github actions for nightly job. há 4 anos atrás

readMESH.cpp

#include

#include

#include
#include

TEST_CASE("readMESH: single-tet","[igl]")
{
const std::string filename = "readMESH_single-tet.mesh";
std::ofstream(filename)<< R"(MeshVersionFormatted 1
Dimension 3
Vertices
4
0 0 0 0
0 0 1 0
0 1 0 0
1 0 0 0
Triangles
0
Tetrahedra
1
1 2 3 4 0
End
)";

Eigen::MatrixXd V;
Eigen::MatrixXi T,F;
igl::readMESH(filename,V,T,F);
REQUIRE(V.rows() == 4);
REQUIRE(T.rows() == 1);
REQUIRE(T(0,0) == 0);
REQUIRE(F.rows() == 0);

}


TEST_CASE("readMESH: no-triangles-line","[igl]")
{
const std::string filename = "readMESH_no-triangles-line.mesh";
std::ofstream(filename)<< R"(MeshVersionFormatted 1
Dimension 3
Vertices
4
0 0 0 0
0 0 1 0
0 1 0 0
1 0 0 0
Tetrahedra
1
1 2 3 4 0
)";

Eigen::MatrixXd V;
Eigen::MatrixXi T,F;
igl::readMESH(filename,V,T,F);
REQUIRE(V.rows() == 4);
REQUIRE(T.rows() == 1);
REQUIRE(T(0,0) == 0);
REQUIRE(F.rows() == 0);

}


TEST_CASE("readMESH: mesh-version-formatted-2","[igl]")
{
const std::string filename = "readMESH_mesh-version-formatted-2.mesh";
std::ofstream(filename)<< R"(MeshVersionFormatted 2
Dimension 3
Vertices
4
0 0 0 0
0 0 1 0
0 1 0 0
1 0 0 0
Triangles
0
Tetrahedra
1
1 2 3 4 0
End
)";

Eigen::MatrixXd V;
Eigen::MatrixXi T,F;
igl::readMESH(filename,V,T,F);
REQUIRE(V.rows() == 4);
REQUIRE(T.rows() == 1);
REQUIRE(T(0,0) == 0);
REQUIRE(F.rows() == 0);

}