Reworked greedy meshing