1. 模型格式转换
在modelname和outputname里面修改后缀名即可,相当于【另存为+格式转换+重命名】
def meshlab_resave(modelname, outputname):
modelname = Path(modelname)
meshlabserver = "D:\\MeshLab\\meshlabserver.exe"
cmd = meshlabserver + " -i " + str(modelname) + " -o " + str(outputname) +" -m vc vn"
#vc, vn 分别表示保存点的颜色和法向
print(cmd)
os.system(cmd)
2. 运行脚本
def meshlab_wscript(modelname, outputname):
modelname = Path(modelname)
meshlabserver = "D:\\MeshLab\\meshlabserver.exe"
scriptname = " -s meshlab_script.mlx"
cmd = meshlabserver + " -i " + str(modelname) + " -o " + outputname +" -m vc vn" + scriptname
print(cmd)
os.system(cmd)
2.1泊松融合 meshlab_poisson.mlx
2.2 删除重复点 meshlab_removedup.mlx
2.3 加密点云meshlab_dense.mlx
2.4 简化模型meshlab_simple.mlx