HalfedgeMesh: Write and test a halfedge data structure