Muscle Wrapping InitialWrapPos

Hello, I am currently trying to improve the supraspinatus wrapping since this muscles sometimes penetrates into the scapula spine.

So I have redefined the supraspinatus by adding a tore surface to guide the supraspinatus fibers.

Some fibers don't go inside the torus but outside :

I understood that we had to add an argument InitWrapPos in the SPLine of each muscle.
However, I have difficulties understanding how it works and what value to define so that the supra wraps inside the torus in the initial conditions.

The definition of my torus is as follows :

Main.Seg.Scapula = {
    
  // Torus to avoid penetrations on the scapular spine
  AnyRefNode My_supraspinatus_torus ={
    sRel = {-0.02, -0.015, -0.027};
    ARel = RotMat(-pi/2, y);
    
    AnyDrawRefFrame drw = {Visible=Off;};
    AnySurfTorus surface = {
      MajorRadius = 0.04;
      MinorRadius = 0.023;
      viewSurface = {Visible=On; RGB={0.65, 0.65, 0.65}; Opacity=0.5;};
    }; // surface
    
  }; // My_supraspinatus_torus
  
}; // Scapula

And for example, the supraspinatus_1 is defined as :

Main.HumanModel.BodyModel.Right.ShoulderArm.Mus = {
  AnyMuscleShortestPath My_supraspinatus_1 = {
    AnyMuscleModel &MusMdl = ..MuscleModels.My_supraspinatus_1; 
    AnyRefNode &Org = ..Seg.Scapula.O_supraspinatus_1; 
    AnyRefNode &Ins = ..Seg.Humerus.I_supraspinatus_1; 
    viewMuscle = {#include "<ANYBODY_PATH_INSTALLDIR>/AMMR/Body/AAUHuman/drawSettings/MusDrawSettings.any"};
    SPLine.StringMesh = 20;
    AnySurfEllipsoid &Surf =.art_gh_humRef;
        
    // added wrapping surfaces    
    AnySurfTorus &Surf3 = ..Seg.Scapula.My_supraspinatus_torus.surface;   
  };

Thank you

Dan

[Edit] : I discovered there was a tutorial about that.

So my problem is solved

Hi Dan,

That's great to hear. Besides the tutorial, there is also the reference manual which normally has simple demo models that you can use to play around with and understand how the class works.

Best regards,
Dave