def makePolyDataFields(pd):
    mesh = computeDelaunay3D(pd)

    if not mesh.GetNumberOfPoints():
        return None

    origin, edges, wireframe = getOrientedBoundingBox(mesh)

    edgeLengths = np.array([np.linalg.norm(edge) for edge in edges])
    axes = [np.linalg.norm(edge) / edge for edge in edges]

    # Use upward axis for z direction
    zaxis = [0, 0, 1]
    dot_products = [  np.dot(axe, zaxis)  for axe in axes  ]
    axes = [ axes[i] for i in np.argsort( dot_products ) ]
    edgeLengths = [ edgeLengths[i] for i in np.argsort( dot_products ) ]

    boxCenter = computeCentroid(wireframe)

    t = getTransformFromAxes(axes[0], axes[1], axes[2])
    t.PostMultiply()
    t.Translate(boxCenter)

    pd = transformPolyData(pd, t.GetLinearInverse())
    wireframe = transformPolyData(wireframe, t.GetLinearInverse())
    mesh = transformPolyData(mesh, t.GetLinearInverse())

    return FieldContainer(points=pd, box=wireframe, mesh=mesh, frame=t, dims=edgeLengths, axes=axes)
dataset/ETHPy150Open RobotLocomotion/director/src/python/director/segmentation.py/makePolyDataFields/swapped operands of `/`