简体   繁体   English

如何通过pymeshlab查找顶点和面号

[英]How to find vertex and face number via pymeshlab

I'm a newbie of pymeshlab and trying to use this tool to do some batch processing.我是 pymeshlab 的新手,正在尝试使用此工具进行一些批处理。 My question is that how to use pymeshlab to find the total vertex and face number of a mesh?我的问题是如何使用 pymeshlab 找到网格的总顶点和面数?

Just use the vertex_number() and face_number() methods.只需使用 vertex_number() 和 face_number() 方法。 You have the documentation here:你在这里有文档:

https://pymeshlab.readthedocs.io/en/latest/classes/mesh.htmlhttps://pymeshlab.readthedocs.io/en/latest/classes/mesh.html

import pymeshlab as ml
ms = ml.MeshSet()
ms.load_new_mesh('input.ply')
m = ms.current_mesh()

print(m.vertex_number(), 'vertex' )
print(m.face_number(), 'faces' )

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM