RE: Python bindings for Partition_2

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

RE: Python bindings for Partition_2

Janusz Michalik
Hello everyone,

Has anyone attempted to write python bindings related to any of the following: 
- Partition_2
- Partition_2/optimal_convex_partition_2

I was able to get the example for 'optimal_convex_partition_2' in C++ to work as well as all the examples in the python bindings running with Python 3.6.

I took a first crack at writing the bindings for 'optimal_convex_partition_2' but I am having a rough time with it. This is my first experience with CGAL and creating python bindings so any help is greatly appreciated!

Thank you for taking the time to read my plight.

Best,
Janusz
Reply | Threaded
Open this post in threaded view
|

Re: Python bindings for Partition_2

Shankar Kulumani
I haven't looked at that particular module but I've been working on using boost Python and/or pybind for connecting cgal to my Python simulation.

If interested I can share a link to my repo and some of the examples I've completed. They can perhaps serve as an example for what you're trying to achieve.

On Tue, Apr 10, 2018, 10:12 Janusz Michalik <[hidden email]> wrote:
Hello everyone,

Has anyone attempted to write python bindings related to any of the following: 
- Partition_2
- Partition_2/optimal_convex_partition_2

I was able to get the example for 'optimal_convex_partition_2' in C++ to work as well as all the examples in the python bindings running with Python 3.6.

I took a first crack at writing the bindings for 'optimal_convex_partition_2' but I am having a rough time with it. This is my first experience with CGAL and creating python bindings so any help is greatly appreciated!

Thank you for taking the time to read my plight.

Best,
Janusz
Reply | Threaded
Open this post in threaded view
|

Re: Python bindings for Partition_2

Sartaj Hundal-2
In reply to this post by Janusz Michalik

On Tue, Apr 10, 2018, 9:10 AM Janusz Michalik, <[hidden email]> wrote:
Hello everyone,

Has anyone attempted to write python bindings related to any of the following: 
- Partition_2
- Partition_2/optimal_convex_partition_2

I was able to get the example for 'optimal_convex_partition_2' in C++ to work as well as all the examples in the python bindings running with Python 3.6.

I took a first crack at writing the bindings for 'optimal_convex_partition_2' but I am having a rough time with it. This is my first experience with CGAL and creating python bindings so any help is greatly appreciated!

Thank you for taking the time to read my plight.

Best,
Janusz
Reply | Threaded
Open this post in threaded view
|

Re: Python bindings for Partition_2

Janusz Michalik
In reply to this post by Shankar Kulumani
That would be great. Maybe I'll be able to see what it is I am missing.

On Tue, Apr 10, 2018 at 4:58 PM, Shankar Kulumani <[hidden email]> wrote:
I haven't looked at that particular module but I've been working on using boost Python and/or pybind for connecting cgal to my Python simulation.

If interested I can share a link to my repo and some of the examples I've completed. They can perhaps serve as an example for what you're trying to achieve.

On Tue, Apr 10, 2018, 10:12 Janusz Michalik <[hidden email]> wrote:
Hello everyone,

Has anyone attempted to write python bindings related to any of the following: 
- Partition_2
- Partition_2/optimal_convex_partition_2

I was able to get the example for 'optimal_convex_partition_2' in C++ to work as well as all the examples in the python bindings running with Python 3.6.

I took a first crack at writing the bindings for 'optimal_convex_partition_2' but I am having a rough time with it. This is my first experience with CGAL and creating python bindings so any help is greatly appreciated!

Thank you for taking the time to read my plight.

Best,
Janusz

Reply | Threaded
Open this post in threaded view
|

Re: Python bindings for Partition_2

Shankar Kulumani
So here's my repo for some of my current research, it is all very much a work in progress.

Also, I'm a beginner programmer so I'm sure there is much wrong with it as well, but hopefully it can at least give you some ideas.

This directory has some scripts used to setup the enviornment, installing CGAL, setting up a Conda environment, etc.

I'm using pybind and some examples of getting it working are in this directory

Here is some source code for interfacing with CGAL/Python using Pybind.

For example, here is cgal.hpp which has two classes for computing the distance to a mesh.

Then using Pybind we can extend their use to Python and a test demonstrating it's working in Python

The top level CMAKE also has some of setup to ensure it's using the correct Python libraries.

Feel free to let me know if you find it useful or have any suggestion for me to improve as well.



On Tue, Apr 10, 2018 at 3:24 PM, Janusz Michalik <[hidden email]> wrote:
That would be great. Maybe I'll be able to see what it is I am missing.

On Tue, Apr 10, 2018 at 4:58 PM, Shankar Kulumani <[hidden email]> wrote:
I haven't looked at that particular module but I've been working on using boost Python and/or pybind for connecting cgal to my Python simulation.

If interested I can share a link to my repo and some of the examples I've completed. They can perhaps serve as an example for what you're trying to achieve.

On Tue, Apr 10, 2018, 10:12 Janusz Michalik <[hidden email]> wrote:
Hello everyone,

Has anyone attempted to write python bindings related to any of the following: 
- Partition_2
- Partition_2/optimal_convex_partition_2

I was able to get the example for 'optimal_convex_partition_2' in C++ to work as well as all the examples in the python bindings running with Python 3.6.

I took a first crack at writing the bindings for 'optimal_convex_partition_2' but I am having a rough time with it. This is my first experience with CGAL and creating python bindings so any help is greatly appreciated!

Thank you for taking the time to read my plight.

Best,
Janusz