Cable Constraint

General description

The “CableConstraint” component simulates a force exerted by a cable.

Methods description

Requirement: Constraint resolution method

Method

Here, the constraint matrix J will contain the direction of force exerted by the cable in the rows corresponding to the pull point of the model, and λ will represent the intensity of the applied force.

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 has multiple input and output datas described in the following section. The two mains input datas are the pull point position, i.e the fixed position from which the cable is pulled. And the indices of the mechanical model points through which the cable will pass (from pull point to extremity). As the volumic mesh may not follows the cable path, one can create an other “MechanicalObject” to describe it and map the path to the target model using a “BarycentricMapping” component:

actuator = bunny.createChild('actuator')
actuator.createObject('MechanicalObject', position="3 -12 -20   3 -12 -10   10 -12 10   10 -12 30   10 -12 45 ")
actuator.createObject('CableConstraint', indices='0 1 2 3 4', pullPoint="3 -12 -100", value="40", valueType="displacement")
actuator.createObject('BarycentricMapping', mapForces="false", mapMasses="false")

Using this method requires to create a new node. This node must be a child of the target model node. The cable can either be controlled by force or displacement.

You will need to put constraint solver (for instance GenericConstraintSolver) and put it on the top of the scene graph.

Examples are provided in the “examples” directory of the plugin.

Data field 

Input data

value : Input values corresponding to the actuations imposed by the constraint

valueIndex : Index of the value (in value vector) that we want to impose. If unspecified, the default value is {0}

valueType : displacement or force. In the first case, the constraint will impose the displacement provided in data value[valueIndex]. In the second case, the constraint will impose the force provided in data value[valueIndex].

Output data

initialCableLength : Length of the cable at the initial state.

cableLength : Length of the cable at the end of the time step.

Comments are closed.