Personal tools
You are here: Home cmgui Wiki How to change your xi directions if you got it wrong first time around...
Views
FrontPage >> Sarahs notes >>

How to change your xi directions if you got it wrong first time around...

last edited 4 years ago by sarah

How to change your xi directions if you got it wrong first time around...

If you've developed your muscle models but have then gone to use them for mechanics or something and found your xi directions are not correct then this is how you can change them. I'm working through the leg and buttock muscles at the moment, changing their xi directions so they can be used for mechanics analysis at some stage.

  1. Create data points on the external faces of the fitted muscle that you currently have by manually selecting the faces in cmgui and putting these face numbers into the data_create.com file. This needs to run on a local version of cm as there have been some changes made to some of the files for this to work properly (i.e. to put points on the correct faces). You can grab these modified files off me or kumar if you need to do this.
  2. Remove any versions/derivatives from the .exnode file of the fitted muscle. Also if you have central nodes in your current fitted model but don't need these then get rid of these from the .exnode file also.
  3. Using cmgui, load the modified .exnode file in and use the element creator to manually select nodes to create linear elements (as detailed here). Write out the nodes and elements and if you have used collapsed nodes then note down these node numbers.
  4. Run perl ex2ip.pl FILENAME

If you have collapsed nodes (nb: they can only have 2 versions) then do the next 2 steps, otherwise skip to fitting.

  1. run perl addverions.pl NODE1,NODE2,NODE3,...,NODEn FILENAME where nodes 1 to n are the node numbers of your collapsed nodes
  2. run perl ipmap.pl NODE1,NODE2,NODE3,...,NODEn FILENAME where nodes 1 to n are the node numbers of your collapsed nodes
  3. run fit.com on cm. I have had to use an old version of cm as something was changed a wee while ago and it wouldn't let me do this anymore on the new version. You can try the normal cm, but if it doesn't work then grab the old_cm version off me. You will need these files to run the fit.com file: small.ippara, threed.ipcoor, bicubic_linear_trilinear_pressure.ipbase, and a .ipfit file (you can modify this one left_adductor_brevis.ipfit).

Contributing to this site

Please add to the wiki any relevant information that you think might be useful to other users of this website. For example, you might like to contribute your experiences, questions and answers.

You are encouraged to contribute to this site regardless of your level of experience. Contributions are welcomed from new and regular visitors.

If you ask a question and receive an answer from a developer you should record it in the wiki. This information is extremely useful and can help other users overcome the same problem.

See how to add and edit pages for more information.