PyMeshLab
PyMeshLab copied to clipboard
Bug: Laplacian smoothing not working after hole filling
After using meshing_close_holes()
on a MeshSet, apply_coord_laplacian_smoothing()
won't have any effect. Details in mwe:
import pymeshlab
pymeshlab.print_pymeshlab_version()
mesh_path ="bunny10k.ply"
ms = pymeshlab.MeshSet()
ms.load_new_mesh(mesh_path)
ms.meshing_close_holes()
verts_before = ms.current_mesh().vertex_matrix()
ms.apply_coord_laplacian_smoothing()
verts_after = ms.current_mesh().vertex_matrix()
print((verts_before == verts_after).all())
ms = pymeshlab.MeshSet()
ms.load_new_mesh(mesh_path)
verts_before = ms.current_mesh().vertex_matrix()
ms.apply_coord_laplacian_smoothing()
verts_after = ms.current_mesh().vertex_matrix()
print((verts_before == verts_after).all())
Out:
PyMeshLab 2022.2.post2 based on MeshLab 2022.02d
True
False
I suspect that "close_holes" select the new created faces, and "apply_coord_laplacian_smoothing" is working only on that set of faces.