Skip to content

Commit

Permalink
topology.py -> use solids for compound volume
Browse files Browse the repository at this point in the history
  • Loading branch information
jdegenstein authored Jan 19, 2024
1 parent a4a59e5 commit 31e65f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/build123d/topology.py
Original file line number Diff line number Diff line change
Expand Up @@ -3816,7 +3816,7 @@ def __repr__(self):
def volume(self) -> float:
"""volume - the volume of this Shape"""
# when density == 1, mass == volume
return sum(i.volume for i in self.children)
return sum(i.volume for i in self.solids())

def center(self, center_of: CenterOf = CenterOf.MASS) -> Vector:
"""Return center of object
Expand Down

0 comments on commit 31e65f8

Please sign in to comment.