STL export in local reference frame

Hi,

I understand that the geometry of the bone models in Anybody is not linked with the bony landmarks on the segments. I am using the forces to include them in a FE model. Therefore I like to align the bone properly. What I would like to achieve is a local reference frame in the hip joint centre of rotation, with 1 of the axes directly pointing to the knee joint. In this reference frame I would like to export the forces (AnyMechOutputFile) and export the surface of the bone (to check scaling error of my model).

Normally, Anybody exports an .stl surface in the current position w.r.t. the fixed reference frame. How can I export an .stl with respect to a local reference frame which I have created, like the origin (0,0,0) in the centre of rotation of the hip joint.

Thanks,

Bas

Hi Bas,

It is possible to export the forces in the local ref frame of your choice. There is a switch for that in the AnyMechOutputFileForceExport (please see the reference manual for details).

However it is not possible to export the bone stl file in local coordinates, that is always in global. One trick to do it would be to align the local ref frame with the global one by driving the rotation and linear position between the two reference frame to zero. That may require to create a special version of the model, depending on how it is originaly driven.

The other way is to measure the rotation and displacement between the local and global ref frame and applied it afterwards to the exported stl file with a CAD editing software.

Best regards, Sylvain.

Hi Sylvain,

Thanks for your reply. The mechanical output file is no problem.

However, in literature I found Anybody is solving the inverse dynamics equations with Newton Euler. I managed to validate the SumF=mrDD in the local reference frame, but I did not validate SumM=JwD.

I summed up the moments and added the the forces times their moment arm around the local reference frame. I guess I do something wrong with the rotation matrix. To check how it was working I tried the the function: AnyMechOuputFileEquilEqExport. According to the reference guide, the only obligatory member is the FileName.

I included the statement below in my Studies folder. It creates an empty .txt file (0kb). Is it possible that the function isn’t working properly?

AnyMechOutputFileEquilEqExport EqEqOutput =
{
FileName = “EquilEq.txt”;
/NumberFormat =
{
Digits = 15;
Width = 22;
Style = ScientificNumber;
FormatStr = “”;
};
/
};

Best Regards,

Bas

Hi Bas,
you have to specify a segement for which you want to export the forces:
e.g:
AnyMechOutputFileForceExport FE_out = {
FileName = “files_in/clavload.xml”; UseRefFrameOnOff = On; AnyRefFrame &ref1=Main.HumanModel.BodyModel.Right.ShoulderArm.Seg.Clavicula.localrefframe; AllSegmentsInStudyOnOff = Off;
XMLformatOnOff = On;
//AllSegmentsInStudyOnOff = Off;
AnySeg &clav = Main.HumanModel.BodyModel.Right.ShoulderArm.Seg.Clavicula; };
Best regards,
Sebastian

Hi Sebastian,

Thanks for the reply. The Force Export file is working perfectly. But I am interested in the Equillibrium Eq Ouput file. I tried to define a segment exactly the same way as for the Force Export file.

The script below writes the Force Export File. But for the EquilEq, errors occur: unresolved object for “UseRefFrameOnOff=On” and the same for “AllSegmentsInStudyOnOff=On”.

Because the same reference frame is working fine for the Force Export file, I expect there is other syntax required for the EquilEq File.

AnyMechOutputFileForceExport OutputTest0111 = 
{
  FileName = "files_out/OutputTest0111.txt";
  UseRefFrameOnOff = On;
  AllSegmentsInStudyOnOff = On;
  //XMLformatOnOff = Off;
  AnyRefFrame &LocRef1 = Main.Test2210.Segs.Arm.LocRefOrg;
  AnySeg &Ref = Main.Test2210.Segs.Arm;
};

//
AnyMechOutputFileEquilEqExport EqEqOutput =
{
FileName = “files_out/EquilEq0111.txt”;
UseRefFrameOnOff = On;
AllSegmentsInStudyOnOff= On;
// XMLformatOnOff=Off;
AnyRefFrame &LocRef2 = Main.Test2210.Segs.Arm.LocRefOrg;
AnySeg &arm = Main.Test2210.Segs.Arm;
};

}; // Studies

}; // Main

Hi Bas,

The AnyMechOutputFileEquilEqExport do not have the options :
UseRefFrameOnOff
AllSegmentsInStudyOnOff

This facility will export the dynamic equilibrium equations for the entire system it can not be applied onto one segment.

As far as i know this feature is on its way out of the system, since it is difficult to work with, it creates very large files.

Best regards
Søren