Overload __invert__ for Halfspace (return opposite Halfspace)

This commit is contained in:
Paul Romano 2015-10-05 07:45:55 +07:00
parent bb4608cf13
commit cfb17517eb

View file

@ -988,6 +988,9 @@ class Halfspace(Region):
self.surface = surface
self.side = side
def __invert__(self):
return -self.surface if self.side == '+' else +self.surface
@property
def surface(self):
return self._surface