Wrapping problems

Dear Søren

I was able to resolve some of the steps below. Can you please help with the ones I was not able to complete.

1-Exclude all muscles from the model except the one causing the problem.
- I was able to do this Please see attachment.

  1. Insert an AnyDrawParamSurface in the surface being penetrated to visualize it you can do this directly in the muscle. Typically by writing Surf1={ AnyDrawParamSurf drw={}; }; //assuming a Surf1 reference is existing!
    [COLOR=green]- See example below, [/COLOR]

[COLOR=black]When the program failed the Error link pointed to this code.

AnyShortestPathMuscle Extensor_Pollicis_Longus ={
AnyMuscleModel &MusMdl = …MusPar.Extensor_Pollicis_Longus;
AnyRefNode &Ins = …Seg.Hand.Finger1MetaRef.I_Extensor_Pollicis_Longus;
AnyRefNode &Via2 = …Seg.Hand.Finger1MetaRef.Via1_Extensor_Pollicis_Longus;
AnyRefNode &Via1 = …Seg.Radius.Via_Extensor_Pollicis_Longus;
AnyRefNode &Org = …Seg.Ulna.O_Extensor_Pollicis_Longus;
AnyDrawMuscle DrwMus = {#include “…/drawSettings/MusDrawSettings.any”};
AnySurfCylinder &Surf2 =…Seg.Radius.MedialExtensorCyl.cyl;

Surf2={ AnyDrawParamSurf drw={}; }; [COLOR=green]//it is included here. See attachment showing cylinder.
[/COLOR]
SPLine.StringMesh = 65;
SPLine.RelTol=0.0000001;
SPLine.InitWrapPosVectors = {
{0,0,0},{-0.1,0,…Sign*0},{0,0,0}, {0,0,0.0}
};
};

[/COLOR]
3. Insert an AnyDrawRefFrame in the node which is penetrating.
Q- I think this means add insert a frame in the bone that the muscle is penetrating?
I hope the turtorial can help how to do this?
http://www.anybodytech.com/fileadmin/AnyBody/Docs/Tutorials/chap5_Muscle_modeling/lesson4.html

  1. Try to understand the root of the problem, whether it is related to scaling or motion.
    [COLOR=green]I am sure this is motion. The same scale is used by using motion capture markers. [/COLOR]

  2. Do modifications on either model or motion to solve the problem.
    [COLOR=green]- So far removing of the Via point improved the model. [/COLOR]See later in this string.

Lesson can help with adding the cylinder.
http://www.anybodytech.com/fileadmin/AnyBody/Docs/Tutorials/chap5_Muscle_modeling/lesson4.html

Webcast the adds some understanding of muscle wrapping.
https://www.youtube.com/watch?v=H4AdfD1Vd_w

Sincerely thank you
Damon

When the program failed the Error link pointed to this code.

Is this where we would include code to add a cylinder?

AnyShortestPathMuscle Extensor_Pollicis_Longus ={
AnyMuscleModel &MusMdl = …MusPar.Extensor_Pollicis_Longus;
AnyRefNode &Ins = …Seg.Hand.Finger1MetaRef.I_Extensor_Pollicis_Longus;
AnyRefNode &Via2 = …Seg.Hand.Finger1MetaRef.Via1_Extensor_Pollicis_Longus;
AnyRefNode &Via1 = …Seg.Radius.Via_Extensor_Pollicis_Longus;
AnyRefNode &Org = …Seg.Ulna.O_Extensor_Pollicis_Longus;
AnyDrawMuscle DrwMus = {#include “…/drawSettings/MusDrawSettings.any”};
AnySurfCylinder &Surf2 =…Seg.Radius.MedialExtensorCyl.cyl;

Surf2={ AnyDrawParamSurf drw={}; }; // I will try to include this here?

SPLine.StringMesh = 65;
SPLine.RelTol=0.0000001;
SPLine.InitWrapPosVectors = {
{0,0,0},{-0.1,0,…Sign*0},{0,0,0}, {0,0,0.0}
};
};

There is a problem with Via2 as shown above attachments. So would like to investigate the code. Could you please help me to understand this code?

AnyRefNode &Via2 = …Seg.Hand.Finger1MetaRef.Via1_Extensor_Pollicis_Longus;

Hi Damon,

Your viapoint is located inside the surface. So you need to rethink the how the muscle should follow the viapoints and surface.

Best,
Kasper Pihl Rasmussen

Hi Kasper

It seems the muscle hits the bone almost near the end of the motion activity.

The code was changed to remove Via2 point, by commenting out this code here, for this muscle. See attachment viapoint2_removed. This solved the problem.
//AnyRefNode &Via2 = …Seg.Hand.Finger1MetaRef.Via1_Extensor_Pollicis_L ongus;

Thank you very much
Damon

Hi Kasper

I have another trail that wont let me comment out the Via point to remove it. I get an ERROR, the program will not load. See attachment that shows the Error.

What do you think is happening?

Is it possible to move the Via Point?

Sincerely thank you very much,

Damon

Hello Damon,

Could you please upload a higher quality picture, I cannot read the code text?

What I can tell you is that is indeed possible to comment out a viapoint. If you look at the reference manual, you will see that the muscle only need 2 or more RefNodes to connect the muscle between.

Best,
Kasper Pihl Rasmussen

Hello Kasper

I apologize that it was not so readable. I’ve attached a better picture.

Sincerely thank you very much!
Damon

Hello Damon,

Please look at the tutorial for muscle modeling. It explains how the InitWrapPosVectors function. It is temporary viapoints that are used to set the initial position; this is to ensure that the muscle wraps around the surface the correct way. When you have one via point, your muscle is basically split into two lines.

As the reference manual says: “An array of 3-D vectors that specify the initial shape of the string. The vectors are ordered as rows of a matrix. For each line segment, two vectors must be specified. They are defining two points relative to the line segment’s origin and insertion nodes, and the curve’s initial shape will be three straight lines; from the origin to the first point, then to the second, and finally to the insertion point.”

So when you have &org, &Via1, and &Ins. You need four vectors in total (you have five). Two from &Org to &Via1 and two from &Via1 to &Ins. And please note the two vectors for a certain muscle line part are in relation to the Org and Ins of that particular part.

This is my best guess, you have cut off the picture so I cannot read the entire error message.

Best,
Kasper Pihl Rasmussen

Hello Kasper

Thank you very much,

Here is the words for the ERROR . Ive also attached a picture of the Error. Does this help explain the problem?

ERROR(OBJ1) : E:/Damon/++ AM…nal_1/Body/A…n/Arm/Muscle.any(1796) : Flexor_Digitorum_Superficialis__Digit2.SPLine.InitWrapPosVectors : Too many initial points are specified in ‘InitWrapPosVectors’.
Model loading skipped

I was able to remove via 1 by commenting it out and removing this associated matrix in the SPLine.InitWrapPosVectors. But the model failed again, looks like muscle is penetrating the cylinder and bone now. [b]

Is there a way to move the location of the via point ?[/b]

Sincerely thank you very much!!

Damon

Dear Damon,

We know that this wrapping muscle issues are annoying because it sometimes happens according to the relative locations of different bones. Also we should solve this issues “case by case”.

For you question, of course you can change the location of the via point.
But it means that you should modify the AMMR by yourself.

There is no single golden solution for this. We also do it manually case by case.

I’m sorry if this does not help you too much.

Best regards,
Moonki