It is currently Fri Nov 15, 2019 7:31 am


All times are UTC




Post new topic Reply to topic  [ 22 posts ]  Go to page Previous  1, 2, 3
Author Message
 Post subject: Re: python bindings
PostPosted: Mon Feb 06, 2017 11:57 pm 
Developer
User avatar

Joined: Sun May 04, 2008 6:35 pm
Posts: 1827
So as I understand it, you are now interested in fixing the Python bindings on the develop version of PolyVox, whereas previously you were using an older (master?) version of PolyVox where the bindings already partly worked?

If so then I would roughly try things in this order:

  • Comment out most of the SWIG code, leaving something simple (such as Vector) for testing.
  • Fix up the various paths from where I have moved folders around.
  • Get a RawVolume working with only int or float types (forget about Large/Paging/SimpleVolume for now).
  • Next come the surface extractors. These might be tricky - as usual the problem will be the template parameters and the fact that these are used to control the behaviour of the algorithm. Sadly I really don't know enough about SWIG to help much here.


At this point the develop bindings should work as well as the ones from your older version. Now you can start to think about adding MaterialDensityPair88 and perhaps the other volume types. These may be more tricky!

I should point out that there is an alternative approach which you might want to consider. Instead of fixing the SWIG/Python bindings you could write a set of simple C functions to wrap the PolyVox functionality which you need, and then you could expose these directly to Python. It would be less flexible but tailored to you use-case. Or perhaps a hybrid approach, these C wrappers might be useful for the surface extractors. Let me know if you want more information on how you might do this.

Regarding BitBucket, the pull request, etc - unfortunately PolyVox is no longer under active development as I've moved on to Cubiquity 2 as a spiritual successor. I'm happy to give advice on this forum but won't be doing any development myself. If you can get the bindings working then I may be able to merge the fixed version back in, but the actually development wil need to happen on your fork.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: python bindings
PostPosted: Fri Feb 17, 2017 10:25 am 

Joined: Mon Oct 15, 2012 4:33 pm
Posts: 52
Quote:
So as I understand it, you are now interested in fixing the Python bindings on the develop version of PolyVox, whereas previously you were using an older (master?) version of PolyVox where the bindings already partly worked?

Yes!

Quote:
If so then I would roughly try things in this order:

Comment out most of the SWIG code, leaving something simple (such as Vector) for testing.
Fix up the various paths from where I have moved folders around.
Get a RawVolume working with only int or float types (forget about Large/Paging/SimpleVolume for now).
Next come the surface extractors. These might be tricky - as usual the problem will be the template parameters and the fact that these are used to control the behaviour of the algorithm. Sadly I really don't know enough about SWIG to help much here.


this is what i'm doing, I stopped to the Surface extractor template classes... i think it is the crucial point.

Quote:
I should point out that there is an alternative approach which you might want to consider. Instead of fixing the SWIG/Python bindings you could write a set of simple C functions to wrap the PolyVox functionality which you need, and then you could expose these directly to Python. It would be less flexible but tailored to you use-case. Or perhaps a hybrid approach, these C wrappers might be useful for the surface extractors. Let me know if you want more information on how you might do this.


Could be an option B, i red in the Python docs something about (also blender use a lot C wrappers). First i will try with the SWIG approach, in case i fail i will seriuosly consider the B option.
Thank's for the help David, i will keep you informed,
Walter


Top
Offline Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 22 posts ]  Go to page Previous  1, 2, 3

All times are UTC


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Theme created StylerBB.net