Femoral Torsion tool

Femoral Torsion tool#

This is an example of modifying the femoral torsion of the default leg (TLEM 2.0) geometry by using a model utility tool included within the model repository. The model is the simple standing model where the femoral torsion has been altered to 20 degrees. The model is also a good example on how a similar morphing approach can be used to personalize different body segments.

See also

Model location in AMMR:

Application ‣ Examples ‣ FemoralTorsion ‣ StandingModel.Main.any

The tool was developed by Enrico De Pieri, from the University of Basel Children’s Hospital (UKBB), and Morten E. Lund, from AnyBody Technology A/S.

This tool was made to generate personalized models that account for subject-specific values of femoral torsion, and investigate the effect of torsional alignment on hip loading. This work is published in ‘Frontiers in Bioengineering and Biotechnology’ [1]. Please cite this article when using this tool.


Fig. 1 The tool works by adding a 8 control points around the hip center and knee center, which control a RBF scale function. The control points are scaled with the default model scaling, while the femoral torsion is added on top.#


Fig. 2 The origin and insertion points of the muscles follow the morphed femoral geometry.#

The model tool is a simple include file located in the model repository. It can be included in any model using the following code:

// The femoral torsion tool expects the following variables to be defined
Main.HumanModel.Anthropometrics = {
   AnyVar FemoralTorsionRight = 20;
   AnyVar FemoralTorsionLeft = 20;

// This line must be included before the "HumanModel".
#include "<ANYBODY_PATH_MODELUTILS>/FemoralTorsion/Include.any""


This tool takes as input the nominal value of femoral torsion that is to be expected in the final morphed model. It automatically subtracts the torsional value of the original model’s femoral geometry and introduces a twist in the transversal plane according to the difference between the two values. The femoral torsion in the geometry of the unscaled (TLEM 2.0 cadaver) model is approximately 3.5 degrees, so setting the femoral torsion to 3.5 degrees will not modify the model. In the original publication, a slightly different definition of joint axes for the calculation of torsion in the unscaled model was used, leading to a value of 5.5 degrees. The adjusted value does not alter the functionality of this tool nor the conclusions of the afore-mentioned publication.

The Femoral torsion tool uses a functionality override scaling for thigh segments. In this case the include file sets #define CUSTOM_SCALING_Right_Thigh and #define CUSTOM_SCALING_Left_Thigh to override the default scaling for the right/left thigh.

See also

See the scaling tutorial for more information on how to use the custom scaling functionality in the general case.