py_marching_tets.cpp 931 B

12345678910111213141516171819202122232425262728
  1. // This file is part of libigl, a simple c++ geometry processing library.
  2. //
  3. // Copyright (C) 2017 Sebastian Koch <s.koch@tu-berlin.de> and Daniele Panozzo <daniele.panozzo@gmail.com>
  4. //
  5. // This Source Code Form is subject to the terms of the Mozilla Public License
  6. // v. 2.0. If a copy of the MPL was not distributed with this file, You can
  7. // obtain one at http://mozilla.org/MPL/2.0/.
  8. m.def("marching_tets", []
  9. (
  10. const Eigen::MatrixXd& V,
  11. const Eigen::MatrixXi& T,
  12. const Eigen::MatrixXd& plane,
  13. Eigen::MatrixXd& U,
  14. Eigen::MatrixXi& G,
  15. Eigen::MatrixXi& J,
  16. Eigen::SparseMatrix<double>& BC
  17. )
  18. {
  19. assert_is_VectorX("plane", plane);
  20. Eigen::VectorXd planev;
  21. if (plane.size() != 0)
  22. planev = plane;
  23. Eigen::VectorXi Jv;
  24. igl::marching_tets(V, T, planev, U, G, Jv, BC);
  25. J = Jv;
  26. }, __doc_igl_marching_tets,
  27. py::arg("V"), py::arg("T"), py::arg("plane"), py::arg("U"), py::arg("G"), py::arg("J"), py::arg("BC"));