Merge pull request #4 from justbuchanan/shape-volume

add Volume method to Shape
This commit is contained in:
Adam Urbańczyk
2018-10-12 22:32:01 +02:00
committed by GitHub

View File

@ -462,6 +462,10 @@ class Shape(object):
def Area(self):
raise NotImplementedError
def Volume(self):
# when density == 1, mass == volume
return Shape.computeMass(self)
def _apply_transform(self, T):
return Shape.cast(BRepBuilderAPI_Transform(self.wrapped,