Strictly speaking, we are using a "classoperation" of the sRel object. It has a property called evaluation moment, which is set to be DesignVar. Variables with this label can be overwritten when the model is loaded. Classoperations are action that you can take when right-clicking on objects in AnyBody. For example, you can "Dump" the value into the log window, or you can change sRel.
But the sequence of operations in AnyBody matters, since changing sRel after you ran your calibration and inverse dynamics studies would have no effect. This is why we add our change to a PreOperation of your analysis (just a placeholder for operations that need to be executed first). For example, it could be in Main.MyStudy.InverseDynamicsStudy.PreOperation = { ..type your code here..};
Ideally you don't want to change the repository. All changes to the model can be done externally. Once you modify the AMMR, our support team operates on assumption that the AMMR is correct, which might not be the case, since this is no longer our product.
Segmental CS is not at the center of mass, but where everything is defined for a particular segment. CoM has an sRel itself, which is defined in the segmental CS.
If you're changing joint definition, you need to take care of the "0-posture" yourself. Ideally, when you drive the model into this posture it should become your ref. posture, i.e. a CT scan. Anthropometric scaling is ignored when you do bone morphing. The pipeline will start directly with the unscaled AnyBody geometry and will deform it into a patient-specific one. Internal transformations such as transformations to the Anatomical Scaling Frame will happen automatically if you apply TSeg2ScaleFrame to your source entities.
For example, when we create a landmark based morphing it will look like this, notice the highlights:
AnyFunTransform3DLin Transform = {
ScaleMat = {{1,0,0},{0,1,0},{0,0,1}};
Offset = {0,0,0};
PreTransforms = {&.RBFTransform, &.ReverseTransform};
};
AnyFunTransform3DLin2 AffineTransform =
{
//PreTransforms = {};
Points0 = .**TSeg2ScaleFrame**(.SourceLandmarks);
Points1 = .TargetLandmarks;
Mode = VTK_LANDMARK_AFFINE;
};
AnyFunTransform3DLin2 ReverseTransform = {
Points0 = .AffineTransform.Points1;
Points1 = .AffineTransform.Points0;
Mode = VTK_LANDMARK_RIGIDBODY;
};
AnyFunTransform3DRBF RBFTransform =
{
PreTransforms = {&.AffineTransform};
RBFDef =
{
Type = RBF_Triharmonic;
Param = 1;
};
Points0 = .AffineTransform.Points0;
Points1 = .AffineTransform.Points1;
BoundingBox =
{
Type = BB_Cartesian;
ScaleXYZ = 2*{1, 1, 1};
DivisionFactorXYZ = 5*{1, 1, 1};
};
BoundingBoxOnOff = On;
};
Kind regards,
Pavel