| 13 | |
| 14 | namespace py = pybind11; |
| 15 | void cstrKnotVectorUtils(py::module_&m) |
| 16 | { |
| 17 | py::class_<LNLib::KnotVectorUtils>(m, "KnotVectorUtils") |
| 18 | .def_static("GetContinuity", &LNLib::KnotVectorUtils::GetContinuity) |
| 19 | .def_static("Rescale", &LNLib::KnotVectorUtils::Rescale) |
| 20 | .def_static("GetInsertedKnotElement", py::overload_cast<int, const std::vector<double>&, double, double>(&LNLib::KnotVectorUtils::GetInsertedKnotElement)) |
| 21 | .def_static("GetKnotMultiplicityMap", &LNLib::KnotVectorUtils::GetKnotMultiplicityMap) |
| 22 | .def_static("GetInternalKnotMultiplicityMap", &LNLib::KnotVectorUtils::GetInternalKnotMultiplicityMap) |
| 23 | .def_static("GetInsertedKnotElement", [](const std::vector<double>& knotVector0, const std::vector<double>& knotVector1) { |
| 24 | std::vector<double> insertElements0, insertElements1; |
| 25 | LNLib::KnotVectorUtils::GetInsertedKnotElement(knotVector0, knotVector1, insertElements0, insertElements1); |
| 26 | return py::make_tuple(insertElements0, insertElements1); |
| 27 | }) |
| 28 | .def_static("GetInsertedKnotElements", py::overload_cast<const std::vector<std::vector<double>>&>(&LNLib::KnotVectorUtils::GetInsertedKnotElements)) |
| 29 | .def_static("GetInsertedKnotElements", py::overload_cast<int, const std::vector<double>&>(&LNLib::KnotVectorUtils::GetInsertedKnotElements)) |
| 30 | .def_static("IsUniform", &LNLib::KnotVectorUtils::IsUniform); |
| 31 | } |