def _SortFace(face, points):
    """Rotate face so leftmost vertex is first, where face is
    list of indices in points."""
    n = len(face)
    if n <= 1:
        return face
    lefti = 0
    leftv = face[0]
    for i in range(1, n):
        if points.pos[face[i]] < points.pos[leftv]:
            lefti = i
            leftv = face[i]
    return face[lefti:] + face[0:lefti]
