diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index e44f2ec3..2656c104 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -1,6 +1,7 @@ name: Wheels on: + workflow_dispatch: push: branches: - main diff --git a/src/bounding_box_diagonal.cpp b/src/bounding_box_diagonal.cpp new file mode 100644 index 00000000..ba52cfe0 --- /dev/null +++ b/src/bounding_box_diagonal.cpp @@ -0,0 +1,25 @@ +#include "default_types.h" +#include +#include +#include + +namespace nb = nanobind; +using namespace nb::literals; + +namespace pyigl { + auto bounding_box_diagonal( + const nb::DRef& V + ) { + return igl::bounding_box_diagonal(V); + } +} + +void bind_bounding_box_diagonal(nb::module_ &m) { + m.def("bounding_box_diagonal", &pyigl::bounding_box_diagonal, + "V"_a, + R"(Compute the length of the diagonal of a given meshes axis-aligned bounding + + @param[in] V #V by 3 list of vertex/point positions + @return length of bounding box diagonal)" + ); +} diff --git a/tests/test_all.py b/tests/test_all.py index b666a4e7..7bad4823 100644 --- a/tests/test_all.py +++ b/tests/test_all.py @@ -566,6 +566,7 @@ def test_triangle(): def test_misc(): V,F = igl.icosahedron() BV,BF = igl.bounding_box(V,pad=1.0) + L = igl.bounding_box_diagonal(V) R,C,B = igl.circumradius(V,F) R = igl.inradius(V,F) K = igl.internal_angles(V,F)