add python code to generate a mesh.