Skip to content
Discussion options

You must be logged in to vote

Hi @VictorKingbot,

Since the plugin SofaPython3 it is possibly to integrate sofa simulation into any python3 program, there is no more the requirement to use runSofa at all. This is doable either you use a binary version or one you compiled yourself from the source code.
A quick example which can be either executed into runSofa or in python3 interpreter:

# Required import for python
import Sofa.Core
import Sofa.Simulation
import SofaRuntime

# Function creating the scene and describing the graph (with nodes and components) before it is initialized
# does nothing here... you need to add your own scene.
def createScene(root):
        pass

#Main function ONLY called if this script is called…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@VictorKingbot
Comment options

Answer selected by VictorKingbot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants