Skip to content

Fix Calculation of Compound Center of Masses #1822

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
May 13, 2025
Prev Previous commit
Next Next commit
Add docstring
  • Loading branch information
adam-urbanczyk authored May 11, 2025
commit 841bbee86d6e11803ee0bee8337283510754448c
3 changes: 3 additions & 0 deletions cadquery/occ_impl/shapes.py
Original file line number Diff line number Diff line change
Expand Up @@ -758,6 +758,9 @@ def CombinedCenter(objects: Iterable["Shape"]) -> Vector:

@staticmethod
def _mass_calc_function(obj: "Shape") -> Any:
"""
Helper to find the correct mass calculation function with special compound handling.
"""

type_ = shapetype(obj.wrapped)

Expand Down