cnr-isti-vclab / PyMeshLab

The open source mesh processing python library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

pymeshlab got different result with meshlab

jjjcs opened this issue · comments

Hi,
I am trying to use pymeshlab to repair some mehes. One time , when i using "compute_selection_by_self_intersections_per_face" to select self intersecting faces, pymeshlab failed to select those faces. But the meshlab software filter "Select Self Intersecting Faces" can select 2 self intersecting faces.
After that i have also did some tests, it seems for some cases "compute_selection_by_self_intersections_per_face" and "Select Self Intersecting Faces" in pymeshlab and meshlab sometimes get slightly different result, which it shouldnt. Any reason why that happened?

i have tried with pymeshlab 2022.2.post4 and 2023.12.post1, meshlab version:
image

also my test script:
mesh_path = r".stl"
ms = pymeshlab.MeshSet()
ms.load_new_mesh(mesh_path)
ms.set_current_mesh(0)

ms.compute_selection_by_self_intersections_per_face()

print("selected %i" % ms.current_mesh().selected_face_number(), "self intersecting faces")
print("selected %i" % ms.current_mesh().selected_vertex_number(), "self intersecting vertex")