Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Wheels

on:
workflow_dispatch:
push:
branches:
- main
Expand Down
25 changes: 25 additions & 0 deletions src/bounding_box_diagonal.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#include "default_types.h"
#include <igl/bounding_box_diagonal.h>
#include <nanobind/nanobind.h>
#include <nanobind/eigen/dense.h>

namespace nb = nanobind;
using namespace nb::literals;

namespace pyigl {
auto bounding_box_diagonal(
const nb::DRef<const Eigen::MatrixXd>& 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)"
);
}
1 change: 1 addition & 0 deletions tests/test_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down