PyMeshLab icon indicating copy to clipboard operation
PyMeshLab copied to clipboard

Bug: Laplacian smoothing not working after hole filling

Open kampelmuehler opened this issue 2 years ago • 1 comments

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

kampelmuehler avatar Oct 05 '22 11:10 kampelmuehler

I suspect that "close_holes" select the new created faces, and "apply_coord_laplacian_smoothing" is working only on that set of faces.

jmespadero avatar May 03 '23 21:05 jmespadero