Fixed min distance intersection calculation.Added triangle grid