ComputationalBiomechanicsLab / opensim-creator

A UI for building OpenSim models
https://opensimcreator.com
Apache License 2.0
137 stars 16 forks source link

How to adjust the translation between body geometry and frame? #826

Closed mohse-n closed 4 months ago

mohse-n commented 4 months ago

Hi. First of all, thank you for your work on this software. It has made creation of OpenSim models much simpler.

I am modifying the Rajagopal2015 model to add a separate skull body (connected to the torso via a ball joint). The problem is that I cannot figure out how to change the offset between the body geometry and the head_offset frame (shown in the picture).

This is important for as the joint should be slightly below the geometry of the skull (about the length of the neck) but they are currently much farther apart.

head_joint

adamkewley commented 4 months ago

Hi @mohse-n

I think what you're asking is "how can I move the mesh separately from the joint's frame". If that's the case, then the "trick" is to add an additional offset frame to the thing you want to attach to (say, here, the body_offset), followed by attaching the mesh to that offset frame. This gives you a new frame that can be moved independently of (but is kinematically attached to) the original frame.

Steps:

If you find you have mis-attached a frame somewhere, you can usually right-click a frame/geometry then use the Sockets menu to reattach it to something else. The Re-express in new frame checkbox ensures that the reattachment doesn't cause things to jolt around.

mohse-n commented 4 months ago

Thanks. As you suggested, it seems using the offset frame solved the problem.

In my case, the automatically created offset frames when adding the body were sufficient. I moved torso_offset to the desired location of the joint and then moved head_offset so that the skull geometry was in the correct place.