py_nrosy.cpp 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. m.def("nrosy", []
  2. (
  3. const Eigen::MatrixXd& V,
  4. const Eigen::MatrixXi& F,
  5. const Eigen::MatrixXi& b,
  6. const Eigen::MatrixXd& bc,
  7. const Eigen::MatrixXi& b_soft,
  8. const Eigen::MatrixXd& w_soft,
  9. const Eigen::MatrixXd& bc_soft,
  10. const int N,
  11. const double soft,
  12. Eigen::MatrixXd& R,
  13. Eigen::MatrixXd& S
  14. )
  15. {
  16. assert_is_VectorX("b",b);
  17. assert_is_VectorX("b_soft",b_soft);
  18. assert_is_VectorX("w_soft",w_soft);
  19. Eigen::VectorXi bt;
  20. if (b.size() != 0)
  21. bt = b;
  22. Eigen::VectorXi b_softt;
  23. if (b_soft.size() != 0)
  24. b_softt = b_soft;
  25. Eigen::VectorXd w_softt;
  26. if (w_soft.size() != 0)
  27. w_softt = w_soft;
  28. Eigen::VectorXd St;
  29. igl::copyleft::comiso::nrosy(V,F,bt,bc,b_softt,w_softt,bc_soft,N,soft,R,St);
  30. S = St;
  31. }, __doc_igl_comiso_nrosy,
  32. py::arg("V"), py::arg("F"), py::arg("b"), py::arg("bc"), py::arg("b_soft"), py::arg("w_soft"), py::arg("bc_soft"), py::arg("N"), py::arg("soft"), py::arg("R"), py::arg("S"));
  33. m.def("nrosy", []
  34. (
  35. const Eigen::MatrixXd& V,
  36. const Eigen::MatrixXi& F,
  37. const Eigen::MatrixXi& b,
  38. const Eigen::MatrixXd& bc,
  39. const int N,
  40. Eigen::MatrixXd& R,
  41. Eigen::MatrixXd& S
  42. )
  43. {
  44. assert_is_VectorX("b",b);
  45. Eigen::VectorXi bt;
  46. if (b.size() != 0)
  47. bt = b;
  48. Eigen::VectorXd St;
  49. igl::copyleft::comiso::nrosy(V,F,bt,bc,N,R,St);
  50. S = St;
  51. }, __doc_igl_comiso_nrosy,
  52. py::arg("V"), py::arg("F"), py::arg("b"), py::arg("bc"), py::arg("N"), py::arg("R"), py::arg("S"));