building distance meshes for polygon points.