Geodesics on a flat surface are literally straight lines. When a geodesic meets an edge, it proceeds to the next polygon in a straight line as if the two polygons were lying flat in the same plane.