parry icon indicating copy to clipboard operation
parry copied to clipboard

Consider using `polyhedral_mass_properties`

Open mo8it opened this issue 1 year ago • 2 comments

polyhedral_mass_properties is a library that I just published to calculate mass properties (mass, center of mass and inertia matrix/tensor) of triangle meshes. It is at least 2x faster than MassProperties::from_trimesh. See benchmark.

Using MassProperties::reconstruct_inertia_matrix returns a matrix where xy and xz are swapped. This is probably a bug in the implementation of Parry (I compared with other implementations, not only mine).

If you need any help, please let me know. I could add a version for f32 and add the Apache license.

mo8it avatar Aug 13 '24 12:08 mo8it

Thanks for the suggestion! We'll consider it, but a vendored implementation/fix will likely be preferred than adding dependencies which we'd have to coordinate together.

I'm wondering if the report on reconstruct_intertia_matrix was the original issue for https://github.com/dimforge/parry/pull/334

ThierryBerger avatar Jun 20 '25 07:06 ThierryBerger

Feel free to copy code from my implementation ;) I could also create a PR swapping the algorithm if you want.

mo8it avatar Jun 20 '25 09:06 mo8it