Selecting trimmed surfaces closest to curve

Just in case anyone is interested here is the answer.