User-subroutines Management

The MotionSolve Python Interface allows you to use user-subroutines in Fortran, C, C++ and Python just as MotionSolve can. However, when the user-subroutine is written in Python, it provides for a very elegant way to resolve path and function name issues.

Consider the following example, where you want to define a rotational SFORCE, but the user subroutine for it, fricTorque(), is defined in a second file. A simple way to handle this is as follows:
# Import the function so Python knows about it
from friction_models import fricTorque
# Define the SFORCE now
sf07 = Sforce (label="sfo7", i=m71, j=m81, type="ROTATION", function="user(0.2, 0.3, 10)",