You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi I wanted to know if there is a way to check if a vertex is manifold or not ? Something like is_vertex_manifold in igl but that returns for individual vertex instead for the entire mesh.
The text was updated successfully, but these errors were encountered:
Hey, I think it depends on exactly what you're looking for, but to find "is a vertex only included in edges that occur exactly twice" it's pretty easy to use boolean masks to get those:
In [1]: import trimesh
In [2]: import numpy as np
In [3]: m = trimesh.load('models/rabbit.obj')
In [4]: m.is_watertight
Out[4]: False
In [5]: edges_ok = trimesh.grouping.group_rows(m.edges_sorted, require_count=2).ravel()
In [8]: vertices_ok = np.zeros(len(m.vertices), dtype=bool)
In [9]: vertices_ok[m.edges_sorted[edges_ok].ravel()] = True
In [10]: vertices_ok.all()
Out[10]: False
# these are indices of vertices that are "bad"
In [12]: np.nonzero(~vertices_ok)[0]
Out[12]: array([ 16, 77, 341, 364])
Hi I wanted to know if there is a way to check if a vertex is manifold or not ? Something like is_vertex_manifold in igl but that returns for individual vertex instead for the entire mesh.
The text was updated successfully, but these errors were encountered: