thorax connection to scapula

Hi,

i successfully rotated the thorax by extending the thoracic scale function with an additional rotation.

//original trunk scaling:
    AnyFolder Trunk = {
      AnyVar GeomScale = (..AnthroSegmentLengths.TrunkHeight / ..StandardParameters.Trunk.Height);
      AnyFunTransform3DLin ScaleFunction = {
        ScaleMat ={{.GeomScale,0,0},{0,.GeomScale,0},{0,0,.GeomScale}};
        Offset = {0,0,0};
      };
    };
// modified trunk scaling including a rotation on the sagittal plane be RotCorrTh1_12°.
    AnyFolder TrunkModified = {
      AnyFunTransform3DLin ScaleFunction= {
        PreTransforms = {&..Trunk.ScaleFunction};
        ScaleMat = RotMat(RotCorrTh1_12 *pi/180, z) ;
        Offset = {0, 0, 0};
      };
    };

This is to create a different spinal shape. But now i have a problem with the connection of the thorax and the upper extremities including scapula and clavicula. The cervical spine including skull makes no problems, since it is connected by a joint to the thoracic C7T1 joint node. (Of course further adjustments are necessary to avoid a sharp bend.)

But with respect to the location and orientation of scapula and clavicula i have some problems. When i leave their scale functions unchanged, their locations do not fit to the new thorax location.

The two segments use scale functions which are based on the thoracic scale function.

    AnyFolder Scapula = {
      AnyFunTransform3DLin ScaleFunction = {
        //AnyMat33 ARel ={{0.588988, 0.186879, 0.786238}, {-0.159489, 0.980641, -0.113609}, {-0.792248, -0.058482, 0.607391}};
        AnyMat33 ARel ={{0.561294, -0.097357, -0.821870},    {0.151325,  0.988389, -0.013736},    {0.813664, -0.116660, 0.569509}}';
        ScaleMat = ARel*..Trunk.ScaleFunction.ScaleMat*(ARel');
        Offset = {0,0,0}*ARel';
      };
    };

Therefore i thought i could just let scapula and clavicula scale functions be based on the modified trunk scale function.

ScaleMat = ARel*..TrunkModified.ScaleFunction.ScaleMat*(ARel');

But then still, scapula and clavicula are not transformed (rotated) as expected, and left and right segments are transformed differently.

Do my problems arise from the asymmetry ARel? What is the meaning of this matrix, and what is the meaning of multiplying Trunk.ScaleFunction.ScaleMat from left and right with ARel? How can i find out the correct ARel for the modified trunk scaling?

Thanks a lot,

Thomaz

Two more points: (I refer to AMMR1.5 and AB5.3)

1.) The graphical representation does not seem to be scaled in the same way as the segment. The following two figures show the scapula nodes aa and ai (red balls) for a 30° rotation of thorax, scapula, and clavicula. The two right nodes are directly on the right scapula, the left nodes are not.

2.) After loading, (Fig. 1) the scapulas seem to be effected by the modified transformation, but after Initial Conditions (Fig. 2), they prefer a very strange position close to the unmodified scaling position.

Could someone please give me a hint at which location in the code the scapulas are forced to this strange locations?

Thanks,

Thomaz

PS: There is a comment in the file, where the scapula etc is defined (Arm/Seg.any): “note stc issue for scaling”. Does someone know what the stc issue means?

I found one error in the mean time.

The transformation rule for the trunk is used one more time. It is used for the creation of an ellipsoid which in turn controls the position of some scapula nodes. Here i forgot to change the code for using the modified transformation rule because i did not know that it is used here as well. Correcting this, the model works, for rotations in the sagittal plane of up to about 10° (at least in my configuration).

But there is still another error: The graphical representation of the left scapula is incorrect. Its tip should be located on the node ai, which is located on the ellipsoids surface, but it is somehow distant from the ellipsoid (see Fig. 3). This is really strange as the used transformation for the graphics is the same for both sides. I hope this is just a visual problem.

Any idea on that (before i find the mistake myself ;))?

Thanks for the intention to help and kind regards,

Thomaz

Hi Thomaz,

There is a set of drivers and constraints connecting the thorax to the upper extremities. The problem of the last question can probably be solved by looking at the driver that brings the ai node onto the surface:

//Scapula thorax gliding plane

AnyKinEqSimpleDriver ScapulaAIThoraxNodeDriver = {
  
  AnyKinPointSurface Measure1 = {
    AnyRefFrame &r1 = ...Seg.Scapula.ai;
    AnySurface &s1 = ...ShoulderRef.ScapulaEllipsoidOrigin.Elipse;
    NormedMeasureOnOff = Off;
  };
  
  DriverPos = {0};
  DriverVel = {0};
  Reaction.Type = {Off};
};

And basically two things that could be wrong - either the ai node position or the surface itself. Could you visualize those?

These drivers are also the problem in the previous question.

It is a bit hard to debug this problem from the picture.

Regards,
Pavel

p.s. STC are just the initials.

Hi Pavel,

with respect to the results there are no problems any more. The ai nodes (left and right) have both the correct location. They are located on the surface as should be.

The problem is the graphical representation of the left scapula. The location of the tip of the scapula should be at the ai node. This is, however, only the case for the right scapula. This is strange as for left and right scapula graphics the same scaling function is used.

Could you please just test this by replace the scaling function with the modified one (see above)?

Kind regards,

Thomaz