均匀重网格
pyacvd的Python项目详细描述
该模块采用一个曲面网格,并使用voronoi聚类返回一个均匀网格曲面。这种方法是基于s.valette和j.m.chassery在ACVD中的研究。
安装
使用pip安装很简单:
$ pip install pyacvd
示例
此示例将非均匀四边形网格重新划分为均匀三角形网格。
frompyvistaimportexamplesimportpyacvd# download cow meshcow=examples.download_cow()# plot original meshcow.plot(show_edges=True,color='w')
clus=pyacvd.Clustering(cow)# mesh is not dense enough for uniform remeshingclus.subdivide(3)clus.cluster(20000)# plot clustered cow meshclus.plot()
# remeshremesh=clus.create_mesh()# plot uniformly remeshed cowremesh.plot(color='w',show_edges=True)