sofa-framework / sofa

Real-time multi-physics simulation with an emphasis on medical simulation.
https://www.sofa-framework.org
GNU Lesser General Public License v2.1
867 stars 296 forks source link

Documentation for reference to find all information #4647

Open KHJ273 opened 3 weeks ago

KHJ273 commented 3 weeks ago

Is there any documentation available for reference to find all information about components, attributes, and data in the simulation?

I'm refering examples in SOFA, examples in SofaPyhon3, Scenes in SofaGym, SOFA homepage documentation, and examples of BeamAdapter. However, it's really hard to find the elements of simulator. For example, I wanted to make an object by using a component MeshSTLLoader with the desired position and orientation. However, there was no explanation what attributes can be used for position and orientation. There was even no explanation which order Euler rotation is using. Finally, I figured out them by trial and error, not by documentation.

What I want to know is as follow:

  1. What components does SOFA have? For example, in the code below, there are components: DefaultAnimationLoop, MeshGmshLoader, EulerImplicitSolver, CGLinearSolver, PointSetTopologyContainer, MechanicalObject, UniformMass, and ConstantForceField.
  2. Which attributes are usable in each component? For example, in the code below, the component MechanicalObject has three attributes: template, name, and showObject.
  3. What data should each attribute have? For example, in the code below, the attribute totalForce of the component ConstantForceField has six floats: "1 0 0 0 0 0".
<?xml version="1.0" ?>

<!-- Loader and topology -->
<Node name="root" dt="0.01" gravity="0 0 0">

    <RequiredPlugin name="Sofa.Component.Mass"/>
    <RequiredPlugin name="Sofa.Component.MechanicalLoad"/>
    <RequiredPlugin name="Sofa.Component.StateContainer"/>
    <RequiredPlugin name="Sofa.Component.LinearSolver.Iterative"/>
    <RequiredPlugin name="Sofa.Component.ODESolver.Backward"/>
    <RequiredPlugin name="Sofa.Component.IO.Mesh"/>
    <RequiredPlugin name="Sofa.Component.Topology.Container.Dynamic"/>

    <DefaultAnimationLoop computeBoundingBox="false"/>

    <MeshGmshLoader name="meshLoaderCoarse" filename="mesh/liver.msh" />

    <Node name="Liver">

        <EulerImplicitSolver />
        <CGLinearSolver iterations="200" tolerance="1e-09" threshold="1e-09"/>

        <PointSetTopologyContainer name="topo" src="@../meshLoaderCoarse" />

        <MechanicalObject template="Rigid3d" name="MechanicalModel" showObject="1"/>

        <UniformMass totalMass="1" />
        <ConstantForceField totalForce="1 0 0 0 0 0" />

    </Node>
</Node>

Is there any documentation available for reference to find all information about components, attributes, and data in the simulation?