triangulate on iterator, take flags