Turbomachinery blade passages are conventionally meshed by sweeping a mesh from a reference stream surface to other stream surfaces along the blade span. This approach is widely used in the gas turbine industry but it becomes problematic for simulations where the ow close to the endwall region is important. This is due to the fact that this approach has to make geometrical approximations for endwall features. This paper presents a method that overcomes this diculty and generates optimal meshes for blade passages without geometrical approximations. The robustness of the method is demonstrated by meshing a multi-stage compressor with shroud cavities.Simulations of the compressor show the penalty of using meshes with approximated endwall features and the benet of using meshes generated by the current method.These demonstrate that the proposed method contributes to the improvement of computational uid dynamics as a reliable design tool for turbo-machines.