use tempfile in gen_misc_mesh()