def segmentDrill(point1, point2, point3):


    inputObj = om.findObjectByName('pointcloud snapshot')
    polyData = inputObj.polyData

    viewPlaneNormal = np.array(getSegmentationView().camera().GetViewPlaneNormal())

    polyData, origin, normal = applyPlaneFit(polyData, expectedNormal=viewPlaneNormal, searchOrigin=point1, searchRadius=0.2, angleEpsilon=0.7, returnOrigin=True)


    tablePoints = thresholdPoints(polyData, 'dist_to_plane', [-0.01, 0.01])
    updatePolyData(tablePoints, 'table plane points', parent=getDebugFolder(), visible=False)


    searchRegion = thresholdPoints(polyData, 'dist_to_plane', [0.03, 0.4])
    searchRegion = cropToSphere(searchRegion, point2, 0.30)
    drillPoints = extractLargestCluster(searchRegion)

    drillToTopPoint = np.array([-0.002904, -0.010029, 0.153182])

    zaxis = normal
    yaxis = point2 - point3
    yaxis /= np.linalg.norm(yaxis)
    xaxis = np.cross(yaxis, zaxis)
    xaxis /= np.linalg.norm(xaxis)
    yaxis = np.cross(zaxis, xaxis)

    t = getTransformFromAxes(xaxis, yaxis, zaxis)
    t.PreMultiply()
    t.Translate(-drillToTopPoint)
    t.PostMultiply()
    t.Translate(point2)

    drillMesh = getDrillMesh()

    aff = showPolyData(drillMesh, 'drill', cls=FrameAffordanceItem, visible=True)
    aff.actor.SetUserTransform(t)
    showFrame(t, 'drill frame', parent=aff, visible=False).addToView(app.getDRCView())

    params = getDrillAffordanceParams(origin, xaxis, yaxis, zaxis)
    aff.setAffordanceParams(params)
    aff.updateParamsFromActorTransform()
    aff.addToView(app.getDRCView())
dataset/ETHPy150Open RobotLocomotion/director/src/python/director/segmentation.py/segmentDrill/swapped operands of `-`