Sofa.Core
Contains the general object hierarchy and data structures
A SOFA simulation is referred as a “scene”. A scene contains several object. Each object is implemented as the aggregation of components. Groups of component are grouped and organized logically using a specific container called Node. Nodes are hierarchically organized in a scene graph. For more, see the SOFA lexicography.
Commonly used classes:
A Node stores other nodes and components. |
|
Base class for components which can be added in a simulation |
|
Overridable class for user interaction on SOFA Components |
|
Overridable class to create your own customized force field |
|
Public attribute of a Component (C++ class) visible and accessible to the user (read/write) |
Example
import Sofa.Core
# Create a new node
n = Sofa.Core.Node("MyNode")
# Create a new node
n = Sofa.Core.Node("MyNode"")
# Add a child node name 'Node2'
n.addChild("Node2")
# Add a mechanical component to MyNode
n.addObject("MechanicalObject", name="dofs")
Sofa.Simulation.init(root)
Sofa.Simulation.print(root)
Classes
Base class of the scene graph hierarchy |
|
Base class for Context classes, storing shared variables and parameters |
|
API providing all topology-related functions |
|
Base class for simulation node |
|
Base class for prefabs (for more see Sofa.prefab) |
|
API dedicated to the control of the Camera in SOFA |
|
Component dedicated to the monitoring of the collision information between models |
|
Implementation of BaseContext, storing all shared parameters in Datas |
|
|
Overridable class for user interaction on SOFA Components |
Public attribute of a Component (C++ class) visible and accessible to the user (read/write) |
|
Classic python container implemented for SOFA data fields |
|
Container managing context data |
|
Exposes the data of a sofa object in a way similar to a normal python dictionnary |
|
Iterator reimplemented to fit dataDict |
|
|
Class computing a set of Data outputs from a set of Data inputs |
Stores the connection between two object of type Data |
|
Data of type string |
|
Data of type vector<string> |
|
|
Overridable class to create your own customized force field |
|
Overridable class to create your own customized force field |
|
Overridable class to create your own customized force field |
|
Overridable class to create your own customized force field |
|
Overridable class to create your own customized force field |
|
Overridable class to create your own customized force field |
Connection created between Data instances of two different Components |
|
Hold a linkpath to an object or a data |
|
Component defining the mass of an object |
|
Component defining the mass of an object |
|
Component defining the mass of an object |
|
Component defining the mass of an object |
|
Component defining the mass of an object |
|
Component defining the mass of an object |
|
|
A Node stores other nodes and components. |
Iterator on nodes |
|
Base class for components which can be added in a simulation |
|
Class used to register and dynamically create objects |
|
Topology modifications associated to a set of points |
|
|
Link to a prefab |
|
Prefabs are python templates for a SOFA scene |
Compatibility topology class (against BaseMeshTopology) |