def get_adjacent_face ( surface, edge_data, idx ):
    """ get_adjacent_face ( surface, edge_data, idx )

    Get the number (index) of the face that includes the edge that is the reverse
    direction of the passed (hashed) edge

    @param surface - working surface structure (dictionary)
    @param edge_data - pre generated object edge data
    @param idx - index of the edge to process (in surface [ 'edgehash' ])
    @return face number to add to the surface
    """
    # get the existing stored edge hash from the surface
    edge_hash = surface [ 'edgehash'][ idx ]
    # get the edge end point indexes back from the (searchable) hash
    # create a new hash for the reverse direction edge
    reverse_edge = [ edge_hash & 0xffffffff, edge_hash >> 32 ]
    reverse_hash = reverse_edge [ 0 ] << 32 | reverse_edge [ 1 ]

    if reverse_hash in surface [ 'edgehash' ]:
        return None # Face already on the surface: do not add again

    # return the adjacent face index
    return int ( edge_data [ 'byEdge' ].index ( reverse_hash ) / 3 )