-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot inherit from SofaCaribou ForceFields #106
Comments
Up ! |
Hey @AlbanOdot Sorry for the delay, it is taking me a bit more time than planned. The thing is, since SOFA |
Hey @AlbanOdot , Can you try the branch of this PR ? I have a link issue that remains to be fixed but I think it is only on MacOS. Finally I did not resort to an expensive copy, so it should not have a too big performance drawback. |
Hi, I haven't managed to compile it yet. I compiled the latest stable (2.9) and it compiles well until it reaches the SofaCaribou.cpython-39-x86_64-linux-gnu.so creation. Which version of SofaPython3 are you using? I'm on the latest stable v21.12. |
I've fixed the pybind11 v2.6 and less issue. As for the link error, looks like what I had on macos is also there on Linux. I will investigate. If you don't mind having no attribute to your |
After a lot of extensive tests, it works very well. I haven't found a way to compile it without commenting the said line tough. |
Hello, I was wondering if it is possible to create a Forcefield using both caribou and sofa caribou.
I'm having a bit of a headache understanding where to start.
The idea would be to inherit from HyperElasticForcefield but I have no idea how to handle the template.
When I print the class of a HyperElasticForceField component from my Sofa scene the name it returns is
<class 'SofaCaribou.SofaCaribou.HyperelasticForcefield<Hexahedron>'>
Which is not a valid name for a Python class.I can inherit from HexahedronElasticForce but I cannot add it to my scene though.
[ERROR] [SofaRuntime] TypeError: MyHexahedronElasticForce: No constructor defined!
The SofaPython3 EmptyForceField works properly.
I just want to rewrite the addForce function in python so I can easily access to computation data on the fly.
Any input on how to do so is welcome !
Have a good day.
Alban Odot
The text was updated successfully, but these errors were encountered: