Distributed motion control of robotic swarms has been receiving increased attention due to their potential for application in many domains including emergency response and remote sensing and exploration. A challenging aspect of motion control for swarms is enabling them to move past large obstacles without losing global connectivity. In this paper we present a novel motion primitive for swarms of robots which allows them to flow past large obstacles while remaining connected. This technique relies on a key result from differential geometry, the GaussBonnet theorem, which allows tracking and counting the number of holes in a given triangulated graph in a distributed manner