opensim-creator icon indicating copy to clipboard operation
opensim-creator copied to clipboard

Add ability to add/align primitives in the mesh importer

Open adamkewley opened this issue 3 years ago • 2 comments

Estimate: 1-3d (depends on how comprehensive it needs to be)

Common user use-case: primitive alignment.

The current way that the mesh importer handles joint positioning is very eye-balley, which is great for throwing something together but not so great for more-advanced users.

The way that advanced users model an (e.g.) Xray scan is that they align things along primitives. So (e.g.) the joint center of a knee would be modelled by positioning a cylinder on the mesh scan (xray, whatever), aligning it with the xray so that it roughly matches the bone (along the roll axis) and then the joint center would be placed accordingly (e.g. right in the middle of the cylinder, along the cylinder's top-to-bottom axis, etc.)

They'd also do stuff like place cylinders, spheres, etc. along meshes then use (e.g.) Maya's mesh mating function to boink (I know it's a made up word ;)) them together, followed by placing the joint at the boink location.

adamkewley avatar Feb 18 '22 11:02 adamkewley

Issue #63 is going to implement some standard geometries into the mesh importer. Once they are imported, there needs to be a workflow where a user can right-click a joint and reorient/translate it according to some geometrically relevant property of a clicked geometry (the UX design I'll have to think through...)

adamkewley avatar Feb 21 '22 11:02 adamkewley

A similar idea was suggested by Mohammadreza R (contact details in my gmail, for any followups):

As you know the process of building subject specific OpenSim model, it is necessary to have joint centers. For example, when you have a mesh file of femur which is segmented from medical images, the center of a sphere fitted to the femoral head would be hip joint center. Similarly, the axis of a cylinder fitted to femoral condyles would be knee flexion/extension axis. So, the features I would request are:

  1. A tool for selecting specific area (point clouds) of the mesh. e.g selecting the femoral head (point clouds) of the entire femur
  2. A tool for fitting specific shapes such as sphere, cylinder or etc. to the mesh. e.g fitting a sphere to the selected point clouds from the above feature.
  3. Report required parameters of the fitted geometries from the above feature for building OpenSim model. e.g center, radius, axis and etc.

Please find the following projects that do similar things via MATLAB. https://simtk.org/projects/subj-spec-model/ https://simtk.org/projects/auto-sk-models/

adamkewley avatar Sep 05 '22 08:09 adamkewley