Skip to content

Commit f376514

Browse files
authored
Add is_intrinsic_delaunay function
1 parent 00eec7d commit f376514

1 file changed

Lines changed: 33 additions & 0 deletions

File tree

src/is_intrinsic_delaunay.cpp

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#include "default_types.h"
2+
#include <igl/is_intrinsic_delaunay.h>
3+
#include <nanobind/nanobind.h>
4+
#include <nanobind/ndarray.h>
5+
#include <nanobind/eigen/dense.h>
6+
7+
namespace nb = nanobind;
8+
using namespace nb::literals;
9+
namespace pyigl
10+
{
11+
auto is_intrinsic_delaunay(
12+
const nb::DRef<const Eigen::MatrixXN> &l,
13+
const nb::DRef<const Eigen::MatrixXI> &F)
14+
{
15+
Eigen::Matrix<unsigned char, Eigen::Dynamic, Eigen::Dynamic> D;
16+
igl::is_intrinsic_delaunay(l, F, D);
17+
return D;
18+
}
19+
}
20+
21+
void bind_is_intrinsic_delaunay(nb::module_ &m)
22+
{
23+
m.def("is_intrinsic_delaunay", &pyigl::is_intrinsic_delaunay,
24+
"l"_a,
25+
"F"_a,
26+
R"(Determine if each edge in the mesh (V,F) is Delaunay.
27+
@param[in] l #l by dim list of edge lengths
28+
@param[in] F #F by 3 list of triangles indices
29+
@param[out] D D #F by 3 list of bools revealing whether edges corresponding
30+
23 31 12 are locally Delaunay. Boundary edges are by definition Delaunay.
31+
Non-Manifold edges are by definition not Delaunay.
32+
)");
33+
}

0 commit comments

Comments
 (0)