Specifications
119
SPLine.StringMesh = 20;
This line generates a sequence of 20 equidistant points on the shortest path muscle, and these are the
points that are actually in contact with the wrapping surface(s). More points will give you a more accurate
solution, but they also require more computation time. For shortest path muscles the computation time can
be an important issue. Solving the shortest path problem is a matter of contact mechanics, and with many
muscles in the model this is easily the more computationally demanding operation of all the stuff that the
system does during an analysis. If you have too few points and a complex case of wrapping, the system
may sometimes fail to solve the wrapping problem and exit with an error. In that case the solution is to
increase the number of points.
It is time to see what we have done. If you load the model and run the InverseDynamicAnalysis (and have
done everything right), you will see the model moving through a sequence of positions like this:
As mentioned above, wrapping muscles can also have via points. In fact, we can easily change the via point
muscle, Muscle1, to wrap over the cylinder even though it also has a via point:
AnyShortestPathMuscle Muscle1 = {
AnyMuscleModel &Model = .SimpleModel;
AnyRefFrame &Orig = .GlobalRef.M1Origin;
AnyRefFrame &Via = .Arm.ViaPoint;
AnySurface &srf = .GlobalRef.CylCenter.WrapSurf;
AnyRefFrame &Ins = .Arm.M1Insertion;
SPLine.StringMesh = 20;
AnyDrawMuscle drw = {
Bulging = 2;
ColorScale = 1;
MaxStress = 250000;
};
};
The definition of the two muscle types is very similar, so we only had to change the type from
AnyViaPointMuscle to AnyShortestPathMuscle and insert the wrapping surface and the StringMesh
specification. This gives us the following result:










