py_mesh_boolean.cpp 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  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. // COMPLETE BINDINGS ========================
  9. m.def("mesh_boolean", []
  10. (
  11. const Eigen::MatrixXd& VA,
  12. const Eigen::MatrixXi& FA,
  13. const Eigen::MatrixXd& VB,
  14. const Eigen::MatrixXi& FB,
  15. igl::MeshBooleanType & type,
  16. Eigen::MatrixXd& VC,
  17. Eigen::MatrixXi& FC,
  18. Eigen::MatrixXi& J
  19. )
  20. {
  21. return igl::copyleft::cgal::mesh_boolean(VA, FA, VB, FB, type, VC, FC, J);
  22. }, __doc_igl_copyleft_cgal_mesh_boolean,
  23. py::arg("VA"), py::arg("FA"), py::arg("VB"), py::arg("FB"), py::arg("type"), py::arg("VC"), py::arg("FC"), py::arg("J"));
  24. m.def("mesh_boolean", []
  25. (
  26. const Eigen::MatrixXd& VA,
  27. const Eigen::MatrixXi& FA,
  28. const Eigen::MatrixXd& VB,
  29. const Eigen::MatrixXi& FB,
  30. const std::string & type_str,
  31. Eigen::MatrixXd& VC,
  32. Eigen::MatrixXi& FC,
  33. Eigen::MatrixXi& J
  34. )
  35. {
  36. return igl::copyleft::cgal::mesh_boolean(VA, FA, VB, FB, type_str, VC, FC, J);
  37. }, __doc_igl_copyleft_cgal_mesh_boolean,
  38. py::arg("VA"), py::arg("FA"), py::arg("VB"), py::arg("FB"), py::arg("type_str"), py::arg("VC"), py::arg("FC"), py::arg("J"));
  39. m.def("mesh_boolean", []
  40. (
  41. const Eigen::MatrixXd& VA,
  42. const Eigen::MatrixXi& FA,
  43. const Eigen::MatrixXd& VB,
  44. const Eigen::MatrixXi& FB,
  45. const igl::MeshBooleanType & type,
  46. Eigen::MatrixXd& VC,
  47. Eigen::MatrixXi& FC
  48. )
  49. {
  50. return igl::copyleft::cgal::mesh_boolean(VA, FA, VB, FB, type, VC, FC);
  51. }, __doc_igl_copyleft_cgal_mesh_boolean,
  52. py::arg("VA"), py::arg("FA"), py::arg("VB"), py::arg("FB"), py::arg("type"), py::arg("VC"), py::arg("FC"));
  53. // INCOMPLETE BINDINGS ========================
  54. //m.def("mesh_boolean", []
  55. //(
  56. // const Eigen::MatrixXd& VA,
  57. // const Eigen::MatrixXd& FA,
  58. // const Eigen::MatrixXd& VB,
  59. // const Eigen::MatrixXd& FB,
  60. // std::function<int (const Eigen::Matrix<int, 1, Eigen::Dynamic>)> & wind_num_op,
  61. // std::function<int (const int, const int)> & keep,
  62. // Eigen::MatrixXd& VC,
  63. // Eigen::MatrixXd& FC,
  64. // Eigen::MatrixXd& J
  65. //)
  66. //{
  67. // return igl::copyleft::cgal::mesh_boolean(VA, FA, VB, FB, wind_num_op, keep, VC, FC, J);
  68. //}, __doc_igl_copyleft_cgal_mesh_boolean,
  69. //py::arg("VA"), py::arg("FA"), py::arg("VB"), py::arg("FB"), py::arg("wind_num_op"), py::arg("keep"), py::arg("VC"), py::arg("FC"), py::arg("J"));
  70. //m.def("mesh_boolean", []
  71. //(
  72. // std::vector<DerivedV> & Vlist,
  73. // std::vector<DerivedF> & Flist,
  74. // std::function<int (const Eigen::Matrix<int, 1, Eigen::Dynamic>)> & wind_num_op,
  75. // std::function<int (const int, const int)> & keep,
  76. // Eigen::MatrixXd& VC,
  77. // Eigen::MatrixXd& FC,
  78. // Eigen::MatrixXd& J
  79. //)
  80. //{
  81. // return igl::copyleft::cgal::mesh_boolean(Vlist, Flist, wind_num_op, keep, VC, FC, J);
  82. //}, __doc_igl_copyleft_cgal_mesh_boolean,
  83. //py::arg("Vlist"), py::arg("Flist"), py::arg("wind_num_op"), py::arg("keep"), py::arg("VC"), py::arg("FC"), py::arg("J"));
  84. //m.def("mesh_boolean", []
  85. //(
  86. // const Eigen::MatrixXd& VV,
  87. // const Eigen::MatrixXd& FF,
  88. // const Eigen::MatrixXd& sizes,
  89. // std::function<int (const Eigen::Matrix<int, 1, Eigen::Dynamic>)> & wind_num_op,
  90. // std::function<int (const int, const int)> & keep,
  91. // Eigen::MatrixXd& VC,
  92. // Eigen::MatrixXd& FC,
  93. // Eigen::MatrixXd& J
  94. //)
  95. //{
  96. // return igl::copyleft::cgal::mesh_boolean(VV, FF, sizes, wind_num_op, keep, VC, FC, J);
  97. //}, __doc_igl_copyleft_cgal_mesh_boolean,
  98. //py::arg("VV"), py::arg("FF"), py::arg("sizes"), py::arg("wind_num_op"), py::arg("keep"), py::arg("VC"), py::arg("FC"), py::arg("J"));