This probably isn't quite the primary interest of this chatroom, but there's a bounty on MSE that maybe someone here could write a good answer to? It's asking how to visually compute fundamental groups given a polygon with identified edges:
math.stackexchange.com/q/3121188/26369