Sofa Python Library

Python side of the framework Sofa.

Example:

TODO
splib.algorithms Algorithms we often use.
splib.animation Animation framework focusing in ease of use.
splib.caching
splib.debug
splib.geometric
splib.loaders Utilitary function to ease the writing of scenes.
splib.numerics
splib.objectmodel
splib.scenegraph Algorithms we often use.
splib.units Toolbox to manipulats units (time, mechanics, material)

Sofa Template Library

Utility functions and scene templates for the real-time simulation framework Sofa. The different templates are organized in types and abstract the complexity of object creation with Sofa.

The library is hosted on github https://github.com/SofaDefrost/STLIB/ and it can be used with scenes written in python and PSL.

Example:

from stlib3.scene import MainHeader
from stlib3.solver import DefaultSolver
from stlib3.physics.rigid import Cube, Sphere, Floor
from stlib3.physics.deformable import ElasticMaterialObject

def createScene(rootNode):
    MainHeader(rootNode)
    DefaultSolver(rootNode)

    Sphere(rootNode, name="sphere", translation=[-5.0, 0.0, 0.0])
    Cube(rootNode, name="cube", translation=[5.0,0.0,0.0])

    ElasticMaterialObject(rootNode, name="dragon",
                          volumeMeshFileName="mesh/liver.msh",
                          surfaceMeshFileName="mesh/dragon.stl"
                          translation=[0.0,0.0,0.0])

    Floor(rootNode, name="plane", translation=[0.0, -1.0, 0.0])

Content:

stlib.physics Templates for physical simulation.
stlib.visuals Templates for rendering.
stlib.solver Templates for most of the common time integration setups.
stlib.scene Templates for most of the common scene setups.
stlib.tools