- This topic has 4 replies, 3 voices, and was last updated 5 years, 7 months ago by .
Viewing 5 posts - 1 through 5 (of 5 total)
Viewing 5 posts - 1 through 5 (of 5 total)
- You must be logged in to reply to this topic.
Home › Forum › SOFA › Programming with SOFA › [SOLVED] How to close the runSofa window/reinitialize it in python?
Tagged: 64_bits, Linux_ubuntu, SOFA_1712
Hi,
How I can close the runSofa window by a python code? How I can reinitialize it by a python code?
Thanks,
Zahra
Hi @Zahra
This is sadly a recurring issue with SOFA:
As of today, a simulation ran in the runSofa GUI can only be stopped or killed programatically (by using node.getRootContext().animate = False
or by for instance calling quit()
in the script to end the program.
There is no way to get from the “paused” state to the “animate” state of the simulation without performing keyboard / mouse interaction.
As I suggested In THIS post, you can hack around by faking mouse or keyboard events.
Although it is quite ugly to do such a thing, the runSofa UI wasn’t designed for this kind of tasks.
Whichever way you go, good luck with SOFA!
Hi @Bruno Marques,
Thank you for your reply. I read the related post. At least now I know this is not possible with the current GUI and I should make some kind of hacking.
Best,
Zahra
Yes, Thanks.
WARNING
The forum has been moved to GitHub Discussions.
Old topics and replies are kept here as an archive.