Creating cross-sections of a mesh and reconstructing the shape of the mesh from the cross-sections