Skip to content

Conversation

@inland-taipen
Copy link

Summary

Adds test coverage for ellipsoid shell inertia calculation when dimensions are unequal (a ≠ b ≠ c), addressing the TODO comment from @TaylorHowell in test/user/user_objects_test.cc:909.

Changes

  • Added ShellInertiaEllipsoidDifferentDimensions test case
  • Removed TODO comment (test now implemented)
  • Added #include <cmath> for math functions

Test Coverage

The new test verifies:

  • Shell inertia values differ across axes when a ≠ b ≠ c
  • Volume inertia formula I = mass * (dim1² + dim2²) / 5 for different dimensions
  • Surface area calculation using Thomsen approximation

Testing

  • ✅ New test passes
  • ✅ Existing ShellInertiaEllipsoid test still passes
  • ✅ All tests pass together
  • ✅ No linter errors
  • ✅ Follows existing test patterns

Related

Fixes TODO from line 909: // TODO(taylorhowell): add test for ellipsoid with dimensions: a != b != c

@google-cla
Copy link

google-cla bot commented Dec 14, 2025

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

…b != c)

This addresses the TODO comment from taylorhowell by adding test coverage
for ellipsoids with non-equal dimensions. The test verifies that:
- Shell inertia values differ across axes when a != b != c
- Volume inertia calculation works correctly for different dimensions
- Surface area calculation using Thomsen approximation is correct
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant