diff --git a/include/igl/writePLY.cpp b/include/igl/writePLY.cpp index 610c2ea8c..f325e5de4 100644 --- a/include/igl/writePLY.cpp +++ b/include/igl/writePLY.cpp @@ -147,7 +147,7 @@ bool writePLY( _ed.resize(ED.size()); Eigen::Map >( &_ed[0], ED.rows(), ED.cols() ) = ED; - file.add_properties_to_element("face", FDheader, + file.add_properties_to_element("edge", EDheader, tynyply_type(), ED.rows(), reinterpret_cast( &_ed[0] ), tinyply::Type::INVALID, 0); } diff --git a/tests/include/igl/writePLY.cpp b/tests/include/igl/writePLY.cpp index 97084fac8..9204f3756 100644 --- a/tests/include/igl/writePLY.cpp +++ b/tests/include/igl/writePLY.cpp @@ -1,6 +1,7 @@ #include #include #include +#include #include #include #include @@ -31,12 +32,37 @@ TEST_CASE("writePLY: bunny.ply", "[igl]") Eigen::VectorXd face_data(F1.rows()); for(size_t i=0;i Eheader2; + + //generate edges + igl::edges(F1,E2); + + //generate edge data + Eheader2.push_back("edge_data"); + Eigen::VectorXd edge_data(E2.rows()); + for(size_t i=0;i