def createDrillWall(rightAngleLocation, trianglePose):

    # recover the origin and axes from the pose:
    triangleOrigin = trianglePose.GetPosition()
    xaxis, yaxis, zaxis = transformUtils.getAxesFromTransform( trianglePose )

    # 0.6096 = 24 * .0254 (m = feet)
    # 0.3048 = 12 * .0254 (m = feet)
    edgeRight = np.array([0.0, -1.0, 0.0]) * (0.6)
    edgeUp = np.array([0.0, 0.0, 1.0]) * (0.3)


    pointsInWallFrame = np.zeros((3,3))

    if rightAngleLocation == DRILL_TRIANGLE_BOTTOM_LEFT:
        pointsInWallFrame[1] = edgeUp
        pointsInWallFrame[2] =  edgeRight

    elif rightAngleLocation == DRILL_TRIANGLE_BOTTOM_RIGHT:
        pointsInWallFrame[1] = edgeUp      # edgeRight +edgeUp
        pointsInWallFrame[2] = -edgeRight  # edgeRight

    elif rightAngleLocation == DRILL_TRIANGLE_TOP_LEFT:
        pointsInWallFrame[1] = edgeRight
        pointsInWallFrame[2] = -edgeUp

    elif rightAngleLocation == DRILL_TRIANGLE_TOP_RIGHT:
        pointsInWallFrame[1] = edgeRight
        pointsInWallFrame[2] = edgeRight - edgeUp
    else:
        raise Exception('unexpected value for right angle location: ', + rightAngleLocation)

    center = pointsInWallFrame.sum(axis=0)/3.0
    shrinkFactor = 1#0.90
    shrinkPoints = (center - pointsInWallFrame) * shrinkFactor + center

    d = DebugData()
    for p in pointsInWallFrame:
        d.addSphere(p, radius=0.015)

    for a, b in zip(pointsInWallFrame, np.vstack((pointsInWallFrame[1:], pointsInWallFrame[0]))):
        d.addLine(a, b, radius=0.005)#01)

    for a, b in zip(shrinkPoints, np.vstack((shrinkPoints[1:], shrinkPoints[0]))):
        d.addLine(a, b, radius=0.005)#0.025

    folder = om.getOrCreateContainer('affordances')

    wall = om.findObjectByName('wall')
    om.removeFromObjectModel(wall)

    aff = showPolyData(d.getPolyData(), 'wall', cls=FrameAffordanceItem, color=[0,1,0], visible=True, parent=folder)
    aff.actor.SetUserTransform(trianglePose)
    aff.addToView(app.getDRCView())

    refitWallCallbacks.append(functools.partial(refitDrillWall, aff))

    frameObj = showFrame(trianglePose, 'wall frame', parent=aff, scale=0.2, visible=False)
    frameObj.addToView(app.getDRCView())

    params = dict(origin=triangleOrigin, xaxis=xaxis, yaxis=yaxis, zaxis=zaxis, xwidth=0.1, ywidth=0.1, zwidth=0.1,
                  p1y=shrinkPoints[0][1], p1z=shrinkPoints[0][2],
                  p2y=shrinkPoints[1][1], p2z=shrinkPoints[1][2],
                  p3y=shrinkPoints[2][1], p3z=shrinkPoints[2][2],
                  friendly_name='drill_wall', otdf_type='drill_wall')

    aff.setAffordanceParams(params)
    aff.updateParamsFromActorTransform()


    '''
    rfoot = getLinkFrame(drcargs.getDirectorConfig()['rightFootLink'])
    tt = getTransformFromAxes(xaxis, yaxis, zaxis)
    tt.PostMultiply()
    tt.Translate(rfoot.GetPosition())
    showFrame(tt, 'rfoot with wall orientation')
    aff.footToAffTransform = computeAToB(tt, trianglePose)

    footToAff = list(aff.footToAffTransform.GetPosition())
    tt.TransformVector(footToAff, footToAff)

    d = DebugData()
    d.addSphere(tt.GetPosition(), radius=0.02)
    d.addLine(tt.GetPosition(), np.array(tt.GetPosition()) + np.array(footToAff))
    showPolyData(d.getPolyData(), 'rfoot debug')
    '''
dataset/ETHPy150Open RobotLocomotion/director/src/python/director/segmentation.py/createDrillWall/swapped operands of `-`