Do I generate mesh in the wrong way?