From 028d9702704f1be971f62129c26710be45ddb7bf Mon Sep 17 00:00:00 2001 From: Arktetra Date: Sun, 16 Nov 2025 18:27:49 +0545 Subject: [PATCH 1/2] add bindings for binding_box_diagonal --- src/bounding_box_diagonal.cpp | 25 +++++++++++++++++++++++++ tests/test_all.py | 1 + 2 files changed, 26 insertions(+) create mode 100644 src/bounding_box_diagonal.cpp 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) From 8268b93f369c17580edc6f9c8ed12008ca4455f8 Mon Sep 17 00:00:00 2001 From: Sameer Shrestha <136245516+Arktetra@users.noreply.github.com> Date: Sun, 16 Nov 2025 19:30:02 +0545 Subject: [PATCH 2/2] Update wheels.yml --- .github/workflows/wheels.yml | 1 + 1 file changed, 1 insertion(+) 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