LHEEA / meshmagick

A command line tool and a python package to manipulate hydrodynamics meshes
GNU General Public License v3.0
48 stars 27 forks source link

Python 3 version #5

Closed mancellin closed 7 years ago

mancellin commented 7 years ago

I updated the code to work with Python 3. Most of the work has actually been done by 2to3. The main changes are due to the changes in importation rules. I had to move the cli interface in its own file meshmagick_cli.py.

For Python 3, VTK 7.1 can be installed from the clinicalgraphics channel on conda (the version from conda-forge gives weird error messages on my config). The calls to VTK, in for instance the mesh importer, work and the tests are passed. However the VTK visualization tool does not work. I made an ersatz using matplotlib. It is not nearly as good but it can help.

The pytests and the visualization tool still work with Python 2.7.

The setup.py and conda.build still need to be updated. I'd be glad if someone more experienced than me could take care of this.

frongere commented 7 years ago

Thank you Matthieu,

Not tested yet but it looks like a very good job in the text !

I will try to merge as soon as possible but my workload does not tell me when... Could you tell me more about your problems with the vtk viewer ? Could you post some error messages if any for me to know what kind of problem it raises ?

And please don't hesitate to let me know by email if your use of the code is helping you (it gives me more lever to spend time on updates of meshmagick ;) )

Thank you again, you rocks :)

Regards.

mancellin commented 7 years ago

You're welcome :)

Regarding the VTK viewer, I made a few quick tests and I'm confused: depending on the Linux distribution and the VTK distribution, it sometimes works and sometimes fails with libGL error: unable to load driver: swrast_dri.so (and not exactly like I remember it from last month...). I should test it again later in some clean environments.

The good news is that the problem probably doesn't come from Meshmagick.

PS: yes, the code is helping me a lot to work on this.

mancellin commented 7 years ago

About the VTK compatibility problem: On a clean Ubuntu 17.10 installation, the VTK 7 packages installed with conda from conda-forge and clinicalgraphics both work out of the box with Meshmagick.

mancellin commented 6 years ago

I just noticed the pull request has been closed by mistake when I reorganized the branches in my repo. FYI, my Python 3 fork is still there. I've made some minor refactoring to better work with my own code and I distribute it through conda install -c mancellin meshmagick.