General description
The “VolumeFromTetrahedrons” component computes the volume of a given volumetric mesh (tetrahedrons or/and hexahedrons).
How to use the component
To learn how to create a SOFA scene, please refer to the tutorial provided by the SOFA Modeler or this documentation.
This component needs a volumetric topology in its context:
finger = rootNode.createChild('finger') # Create the popology finger.createObject('MeshVTKLoader', name='loader', filename=path+'finger.vtk') finger.createObject('TetrahedronSetTopologyContainer', src='@loader', name='container') finger.createObject('TetrahedronSetTopologyModifier') finger.createObject('TetrahedronSetTopologyAlgorithms', template='Vec3d') finger.createObject('TetrahedronSetGeometryAlgorithms', template='Vec3d', drawTetrahedra="1") finger.createObject('VolumeFromTetrahedrons')
An example is provided in the “examples” directory of the plugin.
Data field
Input data
positions : If not set by user, find the context mechanical.
tetras : If not set by user, find the context topology.
hexas : If not set by user, find the context topology.
Output data
volume : Output volume