opensim-org / opensim-core

SimTK OpenSim C++ libraries and command-line applications, and Java/Python wrapping.
https://opensim.stanford.edu
Apache License 2.0
758 stars 308 forks source link

Wrapping Geometry does not function well at endpoints #3741

Open mrrezaie opened 3 months ago

mrrezaie commented 3 months ago

Hi, this is vastlat_r muscle wrapping around its specific geometry, KnExtVL_at_fem_r in RajagopalLaiUhlrich2023.osim model. In non-uniform scaling, this may happen:

https://github.com/opensim-org/opensim-core/assets/38867713/3faecf1f-e296-4a49-9f77-664a8bc58e0d

Similar thing occurs in the hip for iliacus and psoas muscles. This may lead to discontinuity in the muscle-tendon length and moment arm. I think the geometry is well defined; I was wondering if there could be some fix/improvement mathematically to hinder this from happening. Thank you in advance.

tkuchida commented 3 months ago

IIRC, changing the value of the quadrant property sometimes helps, but it may require you to rotate the cylinder about its long axis so that a single value of the quadrant property results in the desired "sidedness" of the wrapping over the entire range of motion. Unfortunately, how to do this may not be obvious. Fortunately, this Epic suggests that a new wrapping algorithm is coming soon from @nickbianco 🎁