diff --git a/python/py_doc.cpp b/python/py_doc.cpp index 106a1f67a..d4582b4aa 100644 --- a/python/py_doc.cpp +++ b/python/py_doc.cpp @@ -1410,3 +1410,11 @@ const char *__doc_igl_writeOBJ = R"igl_Qu8mg5v7(// Write a mesh in an ascii obj // // Known issues: Horrifyingly, this does not have the same order of // parameters as readOBJ.)igl_Qu8mg5v7"; +const char *__doc_igl_writePLY = R"igl_Qu8mg5v7(// Write a mesh in an ascii ply file + // Inputs: + // str path to outputfile + // V #V by 3 mesh vertex positions + // F #F by 3 mesh indices into V + // N #V by 3 normal vectors + // UV #V by 2 texture coordinates + // Returns true on success, false on error)igl_Qu8mg5v7"; diff --git a/python/py_doc.h b/python/py_doc.h index b4c1ba603..878dc3125 100644 --- a/python/py_doc.h +++ b/python/py_doc.h @@ -116,3 +116,4 @@ extern const char *__doc_igl_winding_number_3; extern const char *__doc_igl_winding_number_2; extern const char *__doc_igl_writeMESH; extern const char *__doc_igl_writeOBJ; +extern const char *__doc_igl_writePLY; diff --git a/python/py_igl.cpp b/python/py_igl.cpp index 335417582..74f0cfc9b 100644 --- a/python/py_igl.cpp +++ b/python/py_igl.cpp @@ -92,6 +92,7 @@ #include #include #include +#include void python_export_igl(py::module &m) @@ -187,5 +188,6 @@ void python_export_igl(py::module &m) #include "py_igl/py_winding_number.cpp" #include "py_igl/py_writeMESH.cpp" #include "py_igl/py_writeOBJ.cpp" +#include "py_igl/py_writePLY.cpp" } diff --git a/python/py_igl/py_writePLY.cpp b/python/py_igl/py_writePLY.cpp new file mode 100644 index 000000000..4069670f9 --- /dev/null +++ b/python/py_igl/py_writePLY.cpp @@ -0,0 +1,23 @@ +m.def("writePLY", [] +( + const std::string str, + const Eigen::MatrixXd& V, + const Eigen::MatrixXi& F, + const Eigen::MatrixXd& N, + const Eigen::MatrixXd& UV +) +{ + return igl::writePLY(str,V,F,N,UV); +}, __doc_igl_writePLY, +py::arg("str"), py::arg("V"), py::arg("F"), py::arg("N"), py::arg("UV")); + +m.def("writePLY", [] +( + const std::string str, + const Eigen::MatrixXd& V, + const Eigen::MatrixXi& F +) +{ + return igl::writePLY(str,V,F); +}, __doc_igl_writePLY, +py::arg("str"), py::arg("V"), py::arg("F")); diff --git a/python/python_shared.cpp b/python/python_shared.cpp index 4e4aaf45b..ce57278ca 100644 --- a/python/python_shared.cpp +++ b/python/python_shared.cpp @@ -151,6 +151,7 @@ PYBIND11_PLUGIN(pyigl) { winding_number writeMESH writeOBJ + writePLY )pyigldoc");