Specifications

120
As you can see, both muscles are now wrapping over the cylinder, and we can run the
InverseDynamicAnalysis. It seems to work, but the system provides the following warning:
WARNING - Via-point 'Main.MyModel.GlobalRef.M1Origin' on 'Main.MyModel.Muscle1.SPLine' is located below
the wrapping surface 'Main.MyModel.GlobalRef.CylCenter.WrapSurf'.
This is a warning that you will see rather frequently when working with complex models with wrapping. The
warning comes when one of the end points or a via point is located below the surface over which the muscle
is supposed to wrap. This means that it is impossible for the muscle to pass through the via point without
penetrating the wrapping surface. In this case the system chooses to let the muscle pass through the via
point and the back to the wrapping surface as soon as possible. In the present case, the origin point of
Muscle1 is only slightly below the cylinder surface, so the problem can be rectified by a small offset on the
origin point:
AnyRefNode M1Origin = {
sRel = {0.0, 0.15, 0};
};
If you are analytically inclined, you may be thinking that the muscles might equally well pass on the other
side of the cylinder. And you are quite right. The reason why both muscle pass over the cylinder rather than
under is that this is the side that is the closest to the muscles' paths before the wrapping is resolved. This
means that we can make a muscle wrap on another side of a wrapping surface by making sure that its initial
position is closer to the side we want it to wrap on. The way to do this is to specify one or more so-called
initial wrapping vectors. These are really points that the muscle initially should pass through. You can
specify as many of these points as you like. In the example below we have used two:
AnyShortestPathMuscle Muscle2 = {
AnyMuscleModel &Model = .SimpleModel;
AnyRefFrame &Orig = .GlobalRef.M2Origin;
AnySurface &srf = .GlobalRef.CylCenter.WrapSurf;
AnyRefFrame &Ins = .Arm.M2Insertion;
SPLine.StringMesh = 20;
SPLine.InitWrapPosVectors = {{-0.2, -0.2, 0}, {-0.05, -0.2, 0}};
AnyDrawMuscle drw = {
Bulging = 2;
ColorScale = 1;
MaxStress = 250000;
};
};
Notice that the InitWrapPosVectors like the StringMesh is part of an object called SPLine. This is an object in