Finished signed distance routines