Monotone pieces / triangulation refactoring to support export