py_miq.cpp 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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 direct_round,
  19. int iter,
  20. int local_iter,
  21. bool DoRound,bool SingularityRound
  22. // std::vector<int> round_vertices,
  23. // std::vector<std::vector<int> > hard_features
  24. )
  25. {
  26. std::vector<int> round_vertices;
  27. std::vector<std::vector<int> > hard_features;
  28. igl::copyleft::comiso::miq(V,F,PD1,PD2,UV,FUV,scale,stiffness,direct_round,iter,local_iter,DoRound, SingularityRound, round_vertices, hard_features);
  29. }, __doc_igl_copyleft_comiso_miq,
  30. 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("direct_round") = false, py::arg("iter") = 5, py::arg("local_iter") = 5, py::arg("DoRound") = true, py::arg("SingularityRound") = true
  31. // , py::arg("round_vertices"), py::arg("hard_features")
  32. );
  33. m.def("miq", []
  34. (
  35. const Eigen::MatrixXd &V,
  36. const Eigen::MatrixXi &F,
  37. const Eigen::MatrixXd &PD1_combed,
  38. const Eigen::MatrixXd &PD2_combed,
  39. const Eigen::MatrixXi &MMatch,
  40. const Eigen::MatrixXi &Singular,
  41. const Eigen::MatrixXi &Seams,
  42. Eigen::MatrixXd &UV,
  43. Eigen::MatrixXi &FUV,
  44. double GradientSize,
  45. double Stiffness,
  46. bool DirectRound,
  47. int iter,
  48. int localIter, bool DoRound, bool SingularityRound
  49. // std::vector<int> roundVertices,
  50. // std::vector<std::vector<int> > hardFeatures
  51. )
  52. {
  53. assert_is_VectorX("Singular",Singular);
  54. std::vector<int> roundVertices;
  55. std::vector<std::vector<int> > hardFeatures;
  56. igl::copyleft::comiso::miq(V,F,PD1_combed,PD2_combed,MMatch,Singular,Seams,UV,FUV,GradientSize,Stiffness,DirectRound,iter,localIter,DoRound, SingularityRound, roundVertices, hardFeatures);
  57. }, __doc_igl_copyleft_comiso_miq,
  58. py::arg("V"), py::arg("F"), py::arg("PD1_combed"), py::arg("PD2_combed"),
  59. py::arg("MMatch"), py::arg("Singular"), py::arg("Seams"),
  60. 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
  61. // , py::arg("roundVertices"), py::arg("hardFeatures")
  62. );