Create a mesh-building function for basic meshes