be sure to delete history before u run this script, as it is extremely slow on dense meshes with a llot of history.