py_bbw.cpp 779 B

1234567891011121314151617181920212223242526272829303132
  1. // Wrap the BBWData class
  2. py::class_<iglData > BBWData(m, "BBWData");
  3. BBWData
  4. .def(py::init<>())
  5. .def_readwrite("partition_unity", &iglData::partition_unity)
  6. .def_readwrite("W0", &iglData::W0)
  7. .def_readwrite("active_set_params", &iglData::active_set_params)
  8. .def_readwrite("verbosity", &iglData::verbosity)
  9. .def("print", [](iglData& data)
  10. {
  11. return data.print();
  12. })
  13. ;
  14. m.def("bbw", []
  15. (
  16. const Eigen::MatrixXd& V,
  17. const Eigen::MatrixXi& Ele,
  18. const Eigen::MatrixXi& b,
  19. const Eigen::MatrixXd& bc,
  20. iglData& data,
  21. Eigen::MatrixXd& W
  22. )
  23. {
  24. assert_is_VectorX("b",b);
  25. Eigen::VectorXi bv;
  26. if (b.size() != 0)
  27. bv = b;
  28. return igl(V, Ele, bv, bc, data, W);
  29. }, __doc_igl_bbw,
  30. py::arg("V"), py::arg("Ele"), py::arg("b"), py::arg("bc"), py::arg("data"), py::arg("W"));