component.engine.VolumeFromTriangles

The VolumeFromTriangles component computes the volume of a given surfacic mesh (triangles or/and quads). In this directory you will find one example showing how to use the component:

  • Finger.pyscn
https://project.inria.fr/softrobot/files/2016/02/Finger_VolumeTriangle.png

Example

finger = rootNode.createChild('finger')

# Create the popology
finger.createObject('MeshSTLLoader', name='loader', filename=path+'finger.stl')
finger.createObject('MeshTopology', src='@loader', name="mesh")
finger.createObject('VolumeFromTriangles')

Data fields

Required Description
positions If not set by user, find the context mechanical.
triangles If not set by user, find the context topology.
quads If not set by user, find the context topology.
Optional Description
update If true, will update the volume with the current positions.
Properties Description
volume Read only. Output volume. Only relevant if closed surface.