parameters: (a)
docstring: Inverts a shape within its existing bounds.
docstring_summary: Inverts a shape within its existing bounds.
docstring_tokens: Inverts a shape within its existing bounds .
function: def invert(a):
      """ Inverts a shape within its existing bounds.
      """
      if a.bounds.is_bounded_xyz():
          return cube(a.bounds.xmin, a.bounds.xmax,
                      a.bounds.ymin, a.bounds.zmax,
                      a.bounds.zmin, a.bounds.zmax) & (~a)
      elif a.bounds.is_bounded_xy():
          return rectangle(a.bounds.xmin, a.bounds.xmax,
                           a.bounds.ymin, a.bounds.ymax) & (~a)
      else:
          return Shape()
function_tokens: def invert ( a ) : if a . bounds . is_bounded_xyz ( ) : return cube ( a . bounds . xmin , a . bounds . xmax , a . bounds . ymin , a . bounds . zmax , a . bounds . zmin , a . bounds . zmax ) & ( ~ a ) elif a . bounds . is_bounded_xy ( ) : return rectangle ( a . bounds . xmin , a . bounds . xmax , a . bounds . ymin , a . bounds . ymax ) & ( ~ a ) else : return Shape ( )