Skip to content

Conversation

@ChrisBarker-NOAA
Copy link

@ChrisBarker-NOAA ChrisBarker-NOAA commented Aug 26, 2020

NOTE: this is NOT ready to merge -- at least not to master.

This looks pretty nice, and I'd really like to have it as a simple to build Python package.

cffi is great for calling external libraries, but as long as you have the cpp code, and need to build it anyway, calling it from Cython should make it easy to build in one step, the same way on all platforms.

I figured it would be totally straightforward, I've done a number of these before, but, well turns out not so much, but it is working now -- not massibly tested, but it works, and no segfaults, and no memory leaks.

After I got it working, I realized that I didn't need to call the C code in the cpp file, as Cython should be able to call C++ templates directly. But that's getting pretty out of my depth, so I thought I'd do it the "easy" way first. And it works. Given the simple interface, this is probably fine.

Anyway, I thought I'd do this PR now, to see if you have an interest in moving this forward. If not, I'll fork it if need be. But I think a ready-to-install Python package of this would be really nice to have.

Note: since I started this I discovered:

https://github.com/cubao/concave_hull/

which is maybe the way to go.

Thanks for your work,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant