py_miq.cpp 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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("miq", []
  9. (
  10. const Eigen::MatrixXd &V,
  11. const Eigen::MatrixXi &F,
  12. const Eigen::MatrixXd &PD1,
  13. const Eigen::MatrixXd &PD2,
  14. Eigen::MatrixXd &UV,
  15. Eigen::MatrixXi &FUV,
  16. double scale,
  17. double stiffness,
  18. bool directRound,
  19. int iter,
  20. int localIter,
  21. bool doRound,
  22. bool singularityRound
  23. )
  24. {
  25. std::vector<int> roundVertices;
  26. std::vector<std::vector<int> > hardFeatures;
  27. igl::copyleft::comiso::miq(V, F, PD1, PD2, UV, FUV, scale, stiffness, directRound, iter, localIter, doRound, singularityRound, roundVertices, hardFeatures);
  28. }, __doc_igl_copyleft_comiso_miq,
  29. py::arg("V"), py::arg("F"), py::arg("PD1"), py::arg("PD2"), py::arg("UV"), py::arg("FUV"), py::arg("scale") = 30.0, py::arg("stiffness") = 5.0, py::arg("directRound") = false, py::arg("iter") = 5, py::arg("localIter") = 5, py::arg("doRound") = true, py::arg("singularityRound") = true
  30. );
  31. m.def("miq", []
  32. (
  33. const Eigen::MatrixXd &V,
  34. const Eigen::MatrixXi &F,
  35. const Eigen::MatrixXd &PD1_combed,
  36. const Eigen::MatrixXd &PD2_combed,
  37. const Eigen::MatrixXi &mismatch,
  38. const Eigen::MatrixXi &singular,
  39. const Eigen::MatrixXi &seams,
  40. Eigen::MatrixXd &UV,
  41. Eigen::MatrixXi &FUV,
  42. double gradientSize,
  43. double stiffness,
  44. bool directRound,
  45. int iter,
  46. int localIter,
  47. bool doRound,
  48. bool singularityRound
  49. )
  50. {
  51. assert_is_VectorX("singular",singular);
  52. std::vector<int> roundVertices;
  53. std::vector<std::vector<int> > hardFeatures;
  54. igl::copyleft::comiso::miq(V, F, PD1_combed, PD2_combed, mismatch, singular, seams, UV, FUV, gradientSize, stiffness, directRound, iter, localIter, doRound, singularityRound, roundVertices, hardFeatures);
  55. }, __doc_igl_copyleft_comiso_miq,
  56. py::arg("V"), py::arg("F"), py::arg("PD1_combed"), py::arg("PD2_combed"),
  57. py::arg("mismatch"), py::arg("singular"), py::arg("seams"),
  58. py::arg("UV"), py::arg("FUV"), py::arg("gradientSize") = 30.0, py::arg("stiffness") = 5.0, py::arg("directRound") = false, py::arg("iter") = 5, py::arg("localIter") = 5, py::arg("doRound") = true, py::arg("singularityRound") = true
  59. );