Anywhere in the code, but it is, of course, nice to make a some sort of output folder
For the second part, you could create invidivudal AnyForceMomemtMeasure2 instances for muscles that have multiple branches. And leave everything else as it was.
If you want to find a list of all muscles you could load a model (say StandingModel) and look in the model tree for:
Main.HumanModel.BodyModel.SelectedOutput.Left.Leg.Muscles.Envelope.
When you select this object - in the description window you can see that this envelope is computed over all muscles in the leg and it should be possible to copy all names, in case you need them all. Otherwise you can just construct an AnyForceMomentMeasure2 for the muscle that you need.
I’m back from holidays and working again on my problem with consolidating the leg muscles. Made an AnyForceMomentMeasure2 for the Vastus Lateralis like that:
Is that right? The curious thing is, that I get out 3 curves… I suppose that’s the x y and z direction? But I just want to get the Muscle Force in general. Like the normal output of the other non-splitted muscles (Fm).
Would be nice to get a little hint how to do that.
You can take a norm of the vector and this will give you the magnitude. This magnitude will correspond to the Ft value. You could try to visualize the direction of your muscle force by using AnyDrawVector to check that it makes sense.
Okay, thank you. I understand that.
The only thing that I still don’t understand is the reference frame. Is it right to refer it to the shank in the case of vastus lateralis? Or do I have to refer it to the global coordinations to get the Fm of the muscle?
Sorry for not stopping asking… but I have to understand how this works.
Thanks!
That’s perfectly ok to ask. It would be worse if you did not
The reference frame - it is what you select. You can output in global, local, a muscle attachment node ref. frame or segmental. Depending on how you need you can do different things - using AnyForceMomentMeasure classes will recompute the forces/moments in the relevant ref. frame.
Thank you, that’s more or less clear now.
To be sure I got it right one last question :
If I want to find out the Muscle Force in Action (to compare it with other muscle Forces in literature or also with other Muscle Ft values from Anybody) I have to compute the Forces/moments that are working on the part of the Body the muscles are working on, right?
For example - vastus lateralis working on the shank, or adductors working on the thight… did I get it right?
Well, the muscle pulls both bones (or other anatomical parts). So it is up to you to choose something that corresponds to the data in hand.
And the code you specified here shows that you are outputting everything in the segmental reference frame, which may not necessary reflect someone else’s output frame. It is best to find out what was used and construct the same entity in AnyBody, e.g. one could use the ISB recommendations for anatomical axes.
AnyFloat FObturatoriusExternus = vnorm(Main.Studies.InverseDynamicStudy.Obturatoriu sExternus.F);
can be simplified to :
AnyFloat FObturatoriusExternus = vnorm(F); Since the member is in the same folder.
Pavel