Open guparan opened 8 years ago
Hi all,
We created the SofaPython project to track and conduct all python related developement. The project is there: https://github.com/sofa-framework/sofa/projects/2
You can use this issue as a general channel to annonce progress/request etc... When you can create a new issue, please:
PS: this is an attempt to organize a bit better to "have things done"...if it does not work...then we will try something else :)
Hi @bcarrez @damienmarchal ,
Is there any news about this Python project? Cheers,
Hugo
Just before the February school break we started a branch on our repo. The task #189 is complete (needs more testing to validate it) and is a prerequisite before real python 3 refactoring in SofaPython. Stay tuned.
The branch is: https://github.com/SofaDefrost/sofa/tree/SofaPython3 And it also moved the SofaPython plugin to SofaPython27 dirctory (for backward-compatibility)
Main discussions
Stéphane: building matrices, vectors, to work with SciPy Matthieu: Numpy is able to access the memory directly (there are examples)
There are some Python modules in Compliant with examples to assemble matrices, etc.
Components in Python (Stéphane) "Trash" code, not clean, way to go to C++
Forcefield
Need to put breakpoints to interact with the scene from Python console
Our Python needs:
Matthieu: 90% of Datas are binded in Python, special cases need a binding.
To sum up, we already have what we need, we just don't know how to work with everything.
Besides technical aspects, what we need is a step to step tutorial and more examples.
--> Update online documentation to add Numpy --> Add a doc for newcomers: right now it is very hard to enter in SOFA with Python (no doc)
Start with step by step tutorials and create a Python version of each step.
Other discussions: performances
Pypy
x100 perf but big big cost (recode everything: plugin, bindings, ...)
Cython
ability to code in Python and get C++ code generation we can keep the current plugin but we wont gain perf optimizes some small algos ability to manually release the GIL (lock) ability to connect to the current VM adds a step of compilation using "CIMPORT" but it must have compilo + headers and libs Sofa
Problem of version 2.7 vs 3
Current plugin renamed SofaPython27 SofaPython passes python 3.0
How do you get to use Python?
Stéphane: Making XML optional? Matthieu: python is not just a loader, there is a binding too As said before, we have to use more Python in the tutorials (doc, website ...)
Referee: @bcarrez
Interested people: @matthieu-nesme @damienmarchal @etienneschmitt @bruno-marques @chpaulus
If you are interested please tell it.