I have a non-closed surface in STL. I read it as PolyData with pyvista and then I want to get edge points indices. I go this way:
bot_surf_file = r'bottom.stl'
bot_surf_mesh = pv.PolyData(bot_surf_file)
points = bot_surf_mesh.points
triangles = bot_surf_mesh.faces.reshape((bot_surf_mesh.n_cells, 4))[:, 1:]
edges = bot_surf_mesh.extract_feature_edges(boundary_edges=True)
edge_points_indices = np.where(np.all(np.isin(bot_surf_mesh.points, edges.points), axis=1))
But I dont really rely on numpy.where
. I believe there must be the way to get indices right from pyvista PolyData object. DeepSeek and Opus failed to find the one...