最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

python - Pyvista: get indices of edge points - Stack Overflow

programmeradmin0浏览0评论

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...

发布评论

评论列表(0)

  1. 暂无评论